Most mood-altering drugs interfere with a particular part of the sleep cycle. and spoil sleep. Decongestants, amphetamines, glutamate flavour enhancers and diet pills cause insomnia by arousing the brain.

sleep medications
Most sleep medications disrupt some part of the sleep cycle leaving users still needing sleep and sleepy the next day. Benzodiazapines for example produce a shallow sleep reducing the amount of deep physically restorative sleep. This leaves users tired during the day but still unable to sleep at night without medication.

Caffeine keeps most people awake or lightens sleep but for a small minority makes little difference.

Smokers tend to sleep very lightly with reduced amounts of REM sleep and tend to wake up after 3 or 4 hours of sleep with discomfort from nicotine withdrawal.

Many antidepressants suppress REM sleep.

Alcohol helps falling to sleep but keeps us in the lighter stages of sleep, from which we awaken easily. It diminishes the more restorative REM and deep sleep stages.

The drugs pages have more information and strategies to quit.