NOTE: Before turning to sleep aids to improve your sleep problems, it may be more useful to take a look at your sleep hygiene to eliminate any bad habits which may affect your ability to fall asleep or to maintain sleep. If your sleep hygiene is impeccable and you still struggle with sleep, you might be experiencing drug interactions or side effects from treating other health conditions. 

It may be more useful and effective to look into behavioral or relaxation techniques as your first "go-to" therapies for sleep problems like insomnia or sleep fragmentation before taking more medications, however "natural" they may be. The more medications you take, even if they are nutritional supplements or over the counter, the more likely you are going to run into drug interactions and unexpected side effects.

Whatever you choose, please have this open conversation with your doctor first. Remember, they can advise you not only with regard to drug therapies, but to non-drug techniques as well.

What are the most commonly used drugs and how do they impact sleep?

We know coffee, tea, cola, energy drinks, and chocolate are commonly known to rev up the brain. Caffeine decreases sleepiness and will shorten total sleep duration, reduce deep sleep, and increase the chance for arousals. Withdrawal from caffeine creates an increase in daytime sleepiness, headaches that could interfere with sleep, and an increase in deep nonREM sleep.
Smoking provides a double whammy when it comes to affecting sleep. Nicotine is a stimulant, though it may trick smokers into thinking that it relaxes them. Nicotine addiction can lead to fragmented sleep as it arouses some sleepers to get up and smoke in the middle of the night; this can lead to insomnia, fragmented sleep, and a reduction in deep sleep. For this reason, smoking right before bed practically guarantees you will experience poor sleep. Over the long term, smoking leads to many breathing disorders, such as Chronic Obstructive Pulmonary Disease (COPD), a combination of emphysema and chronic bronchitis which can significantly impair one's ability to maintain an adequate oxygen supply in the bloodstream at night, leading to dangerous issues like hypoxemia. 
It may seem like the perfect sleep aid, but the nightly nightcap is not doing you any favors. Though it helps you to fall asleep, your body, even after one drink, goes through withdrawal once the alcohol is metabolized. This, in turn, interferes with nonREM deep sleep stages, frequent arousals, racing heart, excessive sweating, even vivid dreams and nightmares.
"Weed" is often recommended to people who have trouble sleeping. However, studies show that it actually has a negative impact on your sleep quality, including a reduction in the deep sleep so important to good overall health. It can also amplify negative mood issues, which can affect one's ability to fall asleep. Withdrawal from marijuana use can also lead to several days of poor sleep until the drug is fully metabolized from the bloodstream.
Pain relievers
What could be wrong with taking pain relievers at bedtime? It seems like they should be a first-line defense against insomnia related to chronic pain. Pain can be one of the worst enemies of sleep; a person who is in chronic pain may never be able to settle in comfortably in order to sleep. However, some pain relievers, like codeine and morphine, can disrupt sleep patterns. Other over-the-counter options, like Excedrin, Motrin Complete, and Anacin, also contain caffeine, which can last up to eight hours in the bloodstream. It's always a best practice to read the labels on your over-the-counter drugs; if they have caffeine in them, it will show up on the label.

How can prescription (nonsleep) drugs impact quality and quantity of sleep?

Prescription drugswhether prescribed for sleep problems or for other health conditions—can have a major impact on your sleep architecture. Below, you'll find the most common effects prescriptions can have on your health. Your best best for determining how your particular prescriptions influence your sleep habits is to consult with your pharmacist and/or physician. They can research interactions and consider the side effects together,with all of your other therapies, to best determine if your sleep problems are coming from your medications or from other physical conditions you may have.

Anti-anxiety medications (anxiolytics)
These shorten the time it takes to fall asleep, help you to stay asleep at night, and can help you feel refreshed when you wake up. However, sleep architecture changes with the use of these drugs: you get more light sleep, but your deep sleep stages will be reduced, perhaps significantly. You can develop a tolerance to these drugs which, should you decide to stop taking them, can have a temporary impact on your sleep patterns until you have gone through withdrawal. Anti-anxiety drugs (aka "downers") include benzodiazepines ("benzos" or "bennies"); barbiturates ("barbies"); drugs with a chloral hydrate component; and so-called "Z-class" drugs (nonbenzodiazepines) like zolpidem (aka Ambien), eszoplicone (aka Lunesta), and zaleplon (aka Sonata).

Stimulant drugs
By their very definition, stimulants are not indicated for good sleep in general. They shorten the amount of sleep you get, reduce your deep sleep, make it harder to fall asleep, and break up sleep into fragments. Stimulant drugs ("uppers") include any form of amphetamine, methylphenidate, cocaine, MDMA (aka "Ecstasy"), and a whole slew of dopaminergic drugs (drugs which enhance dopamine response in the brain), which include, commonly, pramipexole, clozapine, Ritalin, modafinil, Wellbutrin, MAO inhibitors, Antabuse, and many others. For a full list of dopaminergic drugs, click here.

Antidepressant medications
These drugs are known to have a major impact on sleep. They can either significantly increase or decrease the quality and quantity of sleep you get. Generally speaking, they all commonly reduce the amount of REM sleep you get, sometimes eliminating this important stage altogether. Antidepressants are broken into several categories: tricyclics, MAOIs, SSRIs, and SNRIs.

  • Tricyclics include amitriptyline, doxepin, and many others. For a full list of tricyclic antidepressants, click here
  • MAOIs include selegeline, moclobemide, and many others. For a full list of MAOIs, click here
  • SSRIs include fluoxetine, citalopram, sertraline, paroxetine, escitalopram, and many others. For a full list of SSRIs, click here
  • SNRIs include venlafaxine, duloxetine, and many others. For a full list of SNRIs, click here.

Antipsychotic medications 
These medications used for schizophrenic patients tend to normalize fragmented sleep, leading to increased sleepiness and more deep sleep. However, users of antipsychotics have a high potential for insomnia upon withdrawal of use of these drugs. Antipsychotic medications include Haldol, Abilify, risperidone, thorazine, Seroquel, and many others. For a full list of antipsychotic medications, click here.

Other common medications 
The following other drugs can have a profound impact on sleep:

  • Drugs use for Alzheimer's disease; Dramamine
  • Antihistamines like diphenhydramine (Benadryl)
  • Dextromethorphan
  • Corticosteroids such as prednisone or those used for treating asthma
  • Beta blockers and drugs used for heart arrhythmias
  • Opioids for pain
  • Diuretics to treat hypertension
  • Synthroid to regulate the thyroid gland
This list is by no means exhaustive. Keep in mind that if single medications can impact sleep, so too can combined medications. Drug interactions can be problematic when it comes to sleep.

How can vitamins and/or supplements impact quality and quantity of sleep?
Don't be tricked into believing you can escape side effects of drugs by using vitamins and nutritional supplements to treat your sleep issues. While there is some evidence that you can improve your sleep quality through nutraceuticals, some supplementsincluding vitamins and herbscan have a negative impact on your ability to sleep. Listed below are a few to consider.

Common vitamins and minerals and their impact on sleep

  • Calcium helps to stimulate melatonin production in the brain, so it can be useful as a sleep aid. Melatonin is the substance secreted by the pineal gland in the late afternoon which regulates the sleep/wake cycle; its main role is encouraging sleep at night as part of your circadian rhythm. 
  • Folic acid deficiency may be a trigger for nightly insomnia. 
  • Iron deficiency is a common cause of Restless Leg Syndrome (RLS), which can be a problem as well at night. That condition, Periodic Leg Movement Disorder, is similar to RLS in that the legs constantly twitch or are difficult to relax once someone has fallen asleep. Often, an iron supplement can be the simple solution to this annoying problem. 
  • Magnesium is well known as a relaxation mineral and can also help to alleviate nocturnal leg cramps.
  • Vitamin B3 is noted for increasing REM sleep and decreasing nighttime awakenings. 
  • Vitamins B6 and B12 are both known for generating vivid dream states. This can lead to sleep disruption night after night, so you may wish to take these supplements in the morning. On the other hand, B6 also has a calmative effect, so if you are not bothered by active REM sleep and need something to help you relax, B6 might be the right fit for you. 
  • Vitamin D seems to improve symptoms of excessive daytime sleepiness in some people, though the mechanisms to explain this are not understood. 
  • Vitamin E, like iron, can help to alleviate problems with daytime and nighttime restless legs.
  • Zinc offers many of magnesium's same relaxing properties. 
Nutritional supplements and their impact on sleep

  • 5-HTP (5-Hydroxytryptophan), derivative of the amino acid L-tryptophan, is often safely taken as a sleep aid, as it causes drowsiness. 
  • Copper as a supplement is very stimulating and a cause of insomnia for many. 
  • GABA is an amino acid produced by the brain which naturally aids in calming the brain; there are synthetic and natural supplements available, but the jury is still out on whether these can positively improve the sleeping process. 
  • Glutathione has a double edge: oxidized forms of glutathione (GSSH) can improve deep sleep, but a lack of naturally occurring glutathione in the body can cause insomnia. 
  • The amino acids L-phenylalanine, S-adenosyl-L-methionine, and L-tyrosine have stimulating effects which can lead to trouble sleeping at night. 
  • Melatonin is the darling of the nutraceutical world; the exogenous (synthetic) form is taken to help enhance the brain's own ability to generate its own endogenous (naturally occurring) melatonin via the pineal gland. Melatonin levels are critical to the chemistry of the human circadian system and should be higher during dim light and nighttime than during the day. Therefore, timing of melatonin dosage is critical to its effectiveness.
  • Theanine is also believed to support relaxation and sleep at night.

Herbs and their impact on sleep

  • Camellia sinensis is a kind of green tea which is thought to increase the brain's natural theanine levels, which support good sleep. 
  • Chamomile tea is famously known to relax the mind in preparation for sleep.
  • Guarana is a highly concentrated form of caffeine and, therefore, not a friend to sleep, but good for people who are excessively sleepy. 
  • Korean Ginseng may disturb your sleep and cause insomnia, but it is also know for shortening sleep onset because of its stress relieving properties. Skullcap is a plant whose upper foliage is used to treat insomnia. 
  • St. John's Wort is another commonly used herb for sleep disorders; it can help you sleep more soundly, contains exogenous melatonin, and supports the brain's own melatonin manufacture. 
  • Valerian is the natural version of the commonly known relaxation drug, Valium; it can help you fall asleep and is commonly used as a medicinal tea to treat insomnia.

Do over-the-counter (OTC) sleep aids work? 

Maybe. Maybe not. Some OTC sleep aids work more as a matter of belief (as in "the placebo effect.") Others work due to the science behind their ingredients. Most OTC sleep aids contain some form of antihistamine, which may or may not be helpful and which may or may not have side effects or drug interactions. The most common OTC sleep aids are Unisom, melatonin, Benadryl, and valerian. Your decision to choose OTC sleep aids should be discussed with a medical professional; at the very least, let your doctor know if you are taking these at your next appointment.