Best medication for insomnia, honestly
The honest answer surprises people: the American Academy of Sleep Medicine recommends a specific therapy — CBT-I — as the FIRST-line treatment for ongoing insomnia, ahead of any pill, because it works as well and lasts longer without the risks. When medication is used, it is usually short-term and chosen by your sleep problem (falling asleep vs staying asleep) and your health.
The part most 'best sleeping pill' lists skip
For chronic insomnia, the first-line treatment is not a drug at all — it is CBT-I (cognitive behavioural therapy for insomnia), which US sleep guidelines recommend before medication because it is as effective and its benefit outlasts a pill’s. Sleep medicines are generally for short-term or occasional use; most carry next-day drowsiness and dependence or rebound risks, and the older over-the-counter antihistamine sleep aids are specifically discouraged for ongoing use, especially in older adults.
Cognitive behavioural therapy (CBT-I)
Therapy — first-line
Not a medication — the guideline-recommended FIRST-line treatment for chronic insomnia. It retrains the habits and thoughts that keep insomnia going, works about as well as sleeping pills, and its benefit lasts after it ends, with none of the drug risks.
Suvorexant (Belsomra)
Orexin antagonist (DORA)
A newer class that blocks the brain’s wake signal rather than sedating you; used for staying asleep. Lower dependence risk than the Z-drugs, but it is still a Schedule IV controlled substance, and it can cause next-day drowsiness and, rarely, sleep paralysis or vivid dreams. It is CONTRAINDICATED in narcolepsy — the label's only contraindication — and is not recommended in severe liver impairment or alongside strong CYP3A inhibitors. Maximum 20 mg a night.
Ramelteon (Rozerem)
Melatonin-receptor agonist
Acts on the same receptors as melatonin to help you fall asleep; it is NOT a controlled substance and is not habit-forming, which makes it an option when dependence is a concern. Its effect is gentle, and it works best for sleep-onset trouble. It is not restriction-free: it is CONTRAINDICATED with fluvoxamine, and not recommended in severe liver impairment or in severe obstructive sleep apnoea — worth knowing if apnoea is the real problem.
Zolpidem (Ambien)
Z-drug (sedative-hypnotic)
A short-acting sedative for trouble FALLING asleep, meant for short-term use. FDA BOXED WARNING: complex sleep behaviours — sleep-walking, sleep-driving and doing other things while not fully awake — which have caused serious injury and death. Anyone who has ever had one must never take the drug again; that is an absolute contraindication, not a caution. It also causes next-morning drowsiness (especially in women and at higher doses), dependence and rebound insomnia, and is avoided in severe liver disease.
Eszopiclone (Lunesta)
Z-drug (sedative-hypnotic)
A longer-acting Z-drug that can help with both falling and staying asleep. It carries the SAME FDA BOXED WARNING as zolpidem for complex sleep behaviours, with the same lifetime bar after any episode, plus next-day drowsiness, dependence and a common metallic taste. The dose must not exceed 2 mg in older or debilitated people, in severe liver impairment, or with a potent CYP3A4 inhibitor.
How to choose
The honest way to narrow it down — matched to your situation, not a ranking. These are common scenarios, not a complete rulebook; the final choice is a prescriber’s.
- Your insomnia is ongoing (weeks or more)
- CBT-I first — the guideline-recommended first-line treatment, ahead of any pill.
- You mainly struggle to FALL asleep
- A short-acting option like zolpidem for the short term, or ramelteon if you want a non-controlled choice.
- You mainly struggle to STAY asleep
- A longer-acting option like eszopiclone or suvorexant.
- You want to avoid dependence
- Ramelteon or suvorexant carry lower dependence risk than the Z-drugs — and CBT-I carries none.
- It is short-term (jet lag, a rough week)
- Occasional use of a sleep aid is reasonable; the risk is nightly reliance, so keep it brief.
Insomnia medications at a glance
| Option | Type | Best for | Controlled? | Watch for |
|---|---|---|---|---|
| CBT-I (therapy) | Non-drug — first-line | Chronic insomnia | No | Needs a few weeks; benefit lasts |
| Zolpidem (Ambien) | Z-drug | Falling asleep | Yes (C-IV) | Next-day drowsiness; complex sleep behaviours |
| Eszopiclone (Lunesta) | Z-drug | Staying asleep | Yes (C-IV) | Metallic taste; dependence |
| Suvorexant (Belsomra) | Orexin antagonist | Staying asleep | Yes (C-IV) | Labeled complex sleep-behaviour warning, as with the Z-drugs. Next-day drowsiness; vivid dreams. CONTRAINDICATED in narcolepsy |
| Ramelteon (Rozerem) | Melatonin agonist | Falling asleep | No | Complex sleep behaviours and next-day impairment are labeled warnings here too — not habit-forming is not the same as no restriction. Contraindicated with fluvoxamine |
| Diphenhydramine (OTC) | Antihistamine | Occasional only | No | Discouraged ongoing; risky in older adults |
What to expect
Sleep medicines are meant for short-term or occasional use, not indefinitely — with nightly use, tolerance can build (needing more for the same effect) and stopping can trigger a night or two of rebound insomnia. Next-day grogginess is common, so they are usually reviewed and, if used for a while, tapered rather than stopped cold. CBT-I is different: its benefit builds over a few weeks and then lasts after the programme ends, which is why guidelines put it first.
When to get medical help
- Loud snoring with pauses in breathing, gasping awake, or heavy daytime sleepiness — possible sleep apnea, which sleeping pills can make more dangerous; get it evaluated before relying on a pill.
- Doing things while not fully awake — driving, eating, walking, texting — with no memory of it: a known ‘complex sleep behaviour’ on Z-drugs. Stop the drug and call your prescriber.
- Insomnia together with low mood, hopelessness or thoughts of self-harm — the depression needs treating too (in the US, 988 in a crisis).
- Needing steadily more medicine for the same sleep — a sign of tolerance; review with your prescriber rather than increasing it yourself.
- Swelling of the face or throat, a rash or trouble breathing after any of these — stop, seek emergency care, and never take that drug again; hypersensitivity is a labeled contraindication on zolpidem, eszopiclone and ramelteon.
- On suvorexant: sudden leg weakness, hallucinations while falling asleep, or being unable to move on waking — report these; the drug is contraindicated in narcolepsy.
Frequently asked questions
What is the best sleeping pill?
There isn’t one — and for ongoing insomnia the best treatment is not a pill at all. US sleep guidelines recommend CBT-I, a short structured therapy, as first-line because it works as well as medication and lasts longer without the risks. When a medicine is used it is usually short-term, chosen by whether you struggle to fall asleep or stay asleep, and by which side effects you can accept — a prescriber’s call.
Are over-the-counter sleep aids safe?
The common OTC sleep aids (diphenhydramine, doxylamine) are antihistamines. They can help occasionally, but they are specifically discouraged for ongoing insomnia — tolerance builds quickly, and in older adults they raise the risk of confusion, falls and other anticholinergic effects. For regular sleep problems, talk to a clinician rather than relying on them.
What is CBT-I?
Cognitive behavioural therapy for insomnia — a short, structured programme (often 4 to 8 sessions, and available in apps) that changes the habits and thoughts keeping insomnia going: sleep scheduling, stimulus control, and managing the anxiety about not sleeping. Guidelines put it ahead of sleeping pills because it is as effective and its benefit lasts after it ends.
Is melatonin good for insomnia?
Melatonin is a hormone supplement that mainly helps shift the body clock — it is most useful for jet lag or a delayed sleep schedule, and its effect on ordinary insomnia is modest. It is generally low-risk for short-term use, but supplements are not tightly regulated so strength can vary. For persistent insomnia, CBT-I is the better-supported first step.
Are Z-drugs like Ambien safe to take every night?
They are designed for short-term use. Taken nightly, Z-drugs (zolpidem, eszopiclone) can lead to tolerance and dependence, and carry risks of next-day impairment and complex sleep behaviours like sleep-driving. If you find you need a sleep medicine every night, that is a reason to see a clinician and consider CBT-I rather than to keep taking it indefinitely.
What actually causes insomnia?
Often it is a mix: stress or anxiety, an irregular sleep schedule, caffeine or alcohol, screens and light at night, pain, or another condition (depression, sleep apnea, restless legs, an overactive thyroid). Because a pill only masks the symptom, guidelines focus first on the habits and any underlying cause — which is what CBT-I addresses.
Guides for these medications
Sources
Treatment-role framing follows standard US clinical guidelines; each drug links to its FDA label and our rating. This is general reference information, not medical advice, and not a recommendation to take any drug — the choice is a decision to make with a clinician. If you are in crisis, call or text 988 (the US Suicide & Crisis Lifeline).