There may be several reasons for insomnia after taking diet pills: 1. Diet pills inhibit the absorption and decomposition of fat in the gastrointestinal tract, which can reduce intestinal function. It is easy to go to the toilet after taking the pill, and you may go to the toilet and have diarrhea several times at night, which can affect the quality of sleep.2. Diet pills contain appetite suppressants, which can reduce the quantity of meals. Patients often have a longer time at night since their last meal, and often have a pronounced feeling of hunger, which can also affect sleep.3. Diet pills sometimes turn the day and night upside down, making people want to sleep during the day and unable to sleep at night, leading to sleep inversions in the long term.4. Patients often experience emotional abnormalities during weight loss due to mental stress, such as irritability, irritability, anxiety and depression, which can lead to insomnia.