Mental health medications

Sleep Medications

Learn about prescription sleep medications for insomnia — including z-drugs, orexin receptor antagonists and others — how they work, side effects, warnings and alternatives such as CBT-I.

At a glance

Medication class
Sleep medications (hypnotics and related medications)
Examples (generic name, brand name)
  • zolpidem (Ambien)
  • eszopiclone (Lunesta)
  • suvorexant (Belsomra)
  • lemborexant (Dayvigo)
  • ramelteon (Rozerem)
  • low-dose doxepin (Silenor)

Examples are for education only and are not a complete list or a recommendation.

Boxed warning: Zolpidem, eszopiclone and zaleplon carry an FDA boxed warning about complex sleep behaviors — such as sleepwalking and sleep-driving — that have caused serious injuries and death. People who have experienced a complex sleep behavior should not take these medications.

What are sleep medications?

Sleep medications (hypnotics) are prescription drugs used to help people fall asleep or stay asleep. They are generally considered alongside, or after, non-medication approaches for insomnia.

What they’re used for

Short-term or, for some medications, longer-term treatment of insomnia, as determined by a prescriber.

How they work

  • “Z-drugs” (zolpidem, eszopiclone, zaleplon) enhance GABA, a calming brain chemical.
  • Orexin receptor antagonists (suvorexant, lemborexant, daridorexant) block orexin, a chemical that promotes wakefulness.
  • Melatonin receptor agonists (ramelteon) act on the body’s sleep-wake signaling.
  • Low-dose doxepin blocks histamine to promote sleep maintenance.
  • Some other medications, such as certain antidepressants, are sometimes used off-label.

How they’re taken

Usually taken shortly before bed, only when you can stay in bed for a full night. Your prescriber and pharmacist will provide specific instructions — this page does not provide dosing guidance.

Common side effects

  • Next-day drowsiness or grogginess
  • Dizziness
  • Headache
  • Unpleasant taste (eszopiclone)

Serious side effects

Complex sleep behaviors (sleepwalking, sleep-driving), memory problems, falls, worsening depression or thoughts of suicide, and severe allergic reactions require prompt medical attention.

Warnings

  • Don’t drive or do activities requiring alertness until you know how the medication affects you the next day.
  • Avoid alcohol and other sedatives.
  • Older adults are more sensitive to side effects such as falls and confusion.

Interactions

Opioids, benzodiazepines, alcohol, antihistamines and other sedating drugs can dangerously increase sedation. Some medications affect how sleep medications are broken down in the body.

Types of sleep medicine

  • Z-drugs such as zolpidem, eszopiclone and zaleplon help with falling or staying asleep. They are controlled substances, carry a risk of dependence and have a boxed warning about complex sleep behaviors such as sleepwalking and sleep-driving.
  • Orexin receptor antagonists such as suvorexant and lemborexant work by dampening wake-promoting signals in the brain. They are newer, are also classed as controlled substances in the US, and may cause next-day drowsiness and unusual dreams.
  • Melatonin receptor agonists such as ramelteon act on the body clock and are not controlled substances.
  • Low-dose doxepin, an older antidepressant used at low strengths, mainly helps with staying asleep.
  • Benzodiazepines are rarely recommended for insomnia because of dependence and withdrawal risks.
  • Over-the-counter options, including antihistamines and melatonin supplements, are widely available. Antihistamines can cause next-day grogginess and confusion, particularly in older adults, and supplement quality and strength vary.

Medication is usually a short-term tool

Guidelines for chronic insomnia generally recommend cognitive behavioral therapy for insomnia (CBT-I) first, because its benefits last after treatment ends, whereas the effect of medication usually stops when you stop taking it. Medicines may be used alongside CBT-I, to bridge a particularly hard period, or when CBT-I isn’t available or hasn’t helped, usually for the shortest time that is helpful. Long-term use should be reviewed regularly by a prescriber. See sleep and mental health and sleep disorders for treatment overviews and our sleep guide for habits that help.

Safety points

  • Complex sleep behaviors: people who have sleepwalked, sleep-driven or done other things they don’t remember after Z-drugs should stop taking them and contact a doctor.
  • Next-day impairment: you can still be drowsy in the morning, which affects driving and alertness. Allow a full night’s sleep before activities requiring alertness.
  • Falls and confusion: older adults are at higher risk, and many guidelines advise avoiding certain sleep medicines in this age group.
  • Alcohol and sedatives: combining them can dangerously increase sedation and slow breathing.
  • Dependence and rebound: after regular use, stopping suddenly can cause worse sleep for some nights; a planned taper is safer.
  • Underlying causes: sleep problems can reflect sleep apnea, restless legs, pain, depression, anxiety, medicines or substances, and sleep medicines can mask or worsen some of these.

Special situations

  • Pregnancy and breastfeeding: options should be discussed with a clinician.
  • Sleep apnea or breathing conditions: some sleep medicines may worsen them.
  • Depression, anxiety or PTSD: treating the underlying condition often improves sleep; see depression and anxiety.
  • Shift work and jet lag: timing of light, sleep and, in some cases, melatonin matters more than a sedative.

Online care and sleep medicines

Many online services don’t prescribe controlled sleep medicines. Services such as Sesame and Lemonaid, for example, assess insomnia but do not prescribe controlled sleep medications like zolpidem; see our reviews of Sesame and Lemonaid Health. If your insomnia is persistent, a medical assessment can check for contributing conditions. If poor sleep comes with low mood or thoughts of self-harm, seek help promptly; see Get Help Now.

Questions to ask your healthcare professional

  • Have we ruled out other causes, such as sleep apnea or depression?
  • Would CBT-I be a good option for me first?
  • How long should I take this medication?
  • What should I do if I feel drowsy the next day?

Many online services do not prescribe controlled sleep medications. Sesame, for example, excludes zolpidem, eszopiclone and zaleplon, while PlushCare doctors may prescribe non-controlled options such as trazodone at their discretion.

Preparing for a conversation with your prescriber

Bring a one- to two-week sleep diary noting bedtime, wake time, awakenings, caffeine, alcohol and naps, plus a list of everything you take, including over-the-counter products. Say how sleep affects your days, whether you snore or stop breathing in your sleep, and whether you have low mood, worry or pain at night. Ask whether CBT-I is available, how long the medicine should be used, how to stop it and what to do if you feel groggy the next day.

Find care

Find the right support

Compare types of care — from online therapy to psychiatry — and learn what to consider before choosing a provider.

Explore care options

When to seek professional help

Consider talking with a doctor or licensed mental health professional if symptomslast for more than two weeks, keep coming back, or make it harder to manage work, school, relationships or daily tasks. You don’t need to wait until things feel severe — getting support early often makes things easier.

If you’re thinking about harming yourself or are in immediate danger, call your local emergency number. In the US, call or text 988 (Suicide & Crisis Lifeline).Crisis resources in other countries.

Explore care options

Frequently asked questions

Is melatonin a good alternative to prescription sleep medication?
Melatonin may help with some circadian rhythm problems, such as jet lag, but evidence for chronic insomnia is limited. In the US it is sold as a supplement, so product content can vary. Ask a healthcare professional before using it, especially for children.
Can I take sleep medication every night?
Some medications are intended for short-term use; others are approved for longer use. Whether nightly use is appropriate depends on the medication and your situation — discuss this with your prescriber.

References

We rely on government health agencies, professional medical organizations, peer-reviewed research and academic institutions. Read our sourcing standards.

  1. Insomnia(opens in a new tab)

    National Heart, Lung, and Blood Institute (NHLBI)Government health agency

About this article

Written by

ExploreMentalHealth Editorial Team

Our editors research and write every article using government health agencies, professional medical organizations and peer-reviewed research, following our published editorial standards.

First published
September 12, 2026
Last updated
September 22, 2026
Last medically reviewed
Review pending