Should you take pills to help you sleep?

If your insomnia can’t be improved with lifestyle changes, your doctor might recommend a sleep medication. Note that these medications are not intended for long-term use, but you can try them for a few weeks as you develop better sleep habits. They also have some risks, so please use them under a doctor’s supervision and don’t sneak them from your friend’s medicine cabinet. Older adults should be particularly cautious, as they may experience confusion, balance problems, and falls when using a sleep medication.

A longer-term, more effective solution that doesn’t have any side effects is cognitive behavioral therapy, or CBT. In this treatment, a psychologist trains your brain to avoid stress, minimize distractions, and relax when the lights go down. Ask your doctor about trying CBT in addition to (or even instead of) sleep medications.

Benadryl/Tylenol PM/Advil PM/Simply Sleep — These over-the-counter medications all contain the same medication, known as diphenhydramine, which is primarily intended as an allergy medication but also causes drowsiness. Although diphenhydramine’s wide availability makes it a common choice for the sleepless, it isn’t reliably effective and has many side effects, including dry mouth, blurred vision, urinary retention (difficulty peeing), and confusion (especially in older adults). Some research has also linked regular diphenhydramine use to early-onset dementia.

Melatonin — Melatonin is a chemical produced in the brain to regulate the sleep–wake cycle. In pill form, it might help reset the clock after a time zone change; in such cases, it should be taken a few hours before the new bedtime. In other settings, however, melatonin typically isn’t very helpful. It’s found in the herbal supplements aisle — which means the pills aren’t carefully regulated and contain a highly variable amount of actual melatonin. (In other words, you may be paying for expensive sawdust in pill form.)

Benzodiazepines (temazepam/Restoril, clonazepam/Klonopin, lorazepam/Ativan) — These medications can help you fall asleep and stay asleep, with some (lorazepam) lasting longer than others (clonazepam). These drugs also help reduce anxiety and stress; for example, we often give them to claustrophobic patients before an MRI. Unfortunately, these medications can be habit-forming. They should be taken for short, predetermined time periods under the supervision of a doctor.

Nonbenzodiazepine hypnotics (eszopiclone/Lunesta, zolpidem/Ambien, zaleplon/Sonata) — These medications are also highly effective but, like benzodiazepines, are habit-forming and should be limited to short courses. In addition, patients using these medications have reported hallucinations or engaging in abnormal behaviors while asleep, such as eating, driving, even having sex (try using that excuse). Although these side effects are uncommon, they’re another reason to be cautious.

Christopher Kelly, M.D., M.S.

Christopher Rehbeck Kelly, M.D., M.S., is a cardiologist at North Carolina Heart and Vascular and UNC Rex Hospital in Raleigh, North Carolina.

Marc Eisenberg, M.D., F.A.C.C.

Marc Sabin Eisenberg, M.D., F.A.C.C., is an associate professor of medicine at Columbia University Medical Center and an attending cardiologist at NewYork-Presbyterian Hospital.