The increase in glutamine levels stimulates the brain while the drinker is trying to sleep, keeping him/her from reaching the deepest levels of sleep. Stopping chronic alcohol use can also lead to severe insomnia with vivid dreams. During withdrawal REM sleep is typically exaggerated as part of a rebound effect. Benzodiazepine-induced
Like alcohol, benzodiazepines, such as alprazolam, clonazepam, lorazepam, and diazepam, are commonly used to treat insomnia in the short-term (both prescribed and self-medicated), but worsen sleep in the long-term. While benzodiazepines can put people to sleep (i.e., inhibit NREM stage 1 and 2 sleep), while asleep, the drugs disrupt sleep architecture: decreasing sleep time, delaying time to REM sleep, and decreasing deep slow-wave sleep (the most restorative part of sleep for both energy and mood). Opioid-induced
Opioid medications such as hydrocodone, oxycodone, and morphine are used for insomnia that is associated with pain due to their analgesic properties and hypnotic effects. Opioids can fragment sleep and decrease REM and stage 2 sleep. By producing analgesia and sedation, opioids may be appropriate in carefully selected patients with pain-associated insomnia. However, dependence on opioids can lead to long-term sleep disturbances. Risk factors
Insomnia affects people of all age groups but people in the following groups have a higher chance of acquiring insomnia:
Individuals older than 60
History of mental health disorder including depression, etc.
Because their perception of their sleep is incomplete, they incorrectly believe it takes them an abnormally long time to fall asleep, and they underestimate how long they remain asleep. Causes
Symptoms of insomnia can be caused by or be associated with:

Sleep breathing disorders, such as sleep apnea or upper airway resistance syndrome
Use of psychoactive drugs (such as stimulants), including certain medications, herbs, caffeine, nicotine, cocaine, amphetamines, methylphenidate, aripiprazole, MDMA, modafinil, or excessive alcohol intake
Use of or withdrawal from alcohol and other sedatives, such as anti-anxiety and sleep drugs like benzodiazepines
Use of or withdrawal from pain-relievers such as opioids
Heart disease
Restless legs syndrome, which can cause sleep onset insomnia due to the discomforting sensations felt and the need to move the legs or other body parts to relieve these sensations
Periodic limb movement disorder (PLMD), which occurs during sleep and can cause arousals of which the sleeper is unaware
Pain: an injury or condition that causes pain can preclude an individual from finding a comfortable position in which to fall asleep, and can also cause awakening.