What is the best medication for insomnia?

Medical Advisory BoardAll articles are reviewed for accuracy by our Medical Advisory Board
Educational purpose only • Exercise caution as content is pending human review
Article Review Status
Submitted
Under Review
Approved

Last updated: November 6, 2025View editorial policy

Personalize

Help us tailor your experience

Which best describes you? Your choice helps us use language that's most understandable for you.

Best Medication for Insomnia

Cognitive Behavioral Therapy for Insomnia (CBT-I) should be the initial treatment for all adults with chronic insomnia, but when pharmacotherapy is necessary, short-to-intermediate acting benzodiazepine receptor agonists (BzRAs)—specifically eszopiclone, zolpidem, or zaleplon—are first-line medications, with the choice determined by whether the primary complaint is sleep onset versus sleep maintenance. 1, 2

Treatment Algorithm

Step 1: Start with CBT-I

  • CBT-I is the gold standard first-line treatment for chronic insomnia in all adults, demonstrating superior long-term efficacy compared to medications with minimal adverse effects 1, 2
  • CBT-I should include stimulus control therapy, sleep restriction therapy, relaxation techniques, and cognitive restructuring 1, 3
  • Even when medications are used, behavioral techniques should continue alongside pharmacotherapy 4, 2

Step 2: First-Line Pharmacotherapy (When CBT-I Alone Is Insufficient)

For Sleep Onset Insomnia:

  • Zaleplon 10 mg at bedtime (short-acting; can be used for middle-of-night awakening if ≥4 hours remain for sleep) 4, 1
  • Zolpidem 10 mg at bedtime (5 mg in elderly; short-to-intermediate acting) 4, 1, 5
  • Ramelteon 8 mg at bedtime (melatonin receptor agonist; no abuse potential, useful for patients with substance use history) 4, 1, 2
  • Triazolam 0.25 mg at bedtime (0.125 mg in elderly; associated with rebound anxiety, not truly first-line) 4, 1

For Sleep Maintenance Insomnia:

  • Eszopiclone 2-3 mg at bedtime (1 mg in elderly; intermediate-acting; no short-term usage restriction, proven effective up to 6 months) 4, 1, 6
  • Zolpidem 10 mg or zolpidem controlled-release 12.5 mg at bedtime (6.25 mg in elderly) 4, 1, 5
  • Temazepam 15-30 mg at bedtime (7.5 mg in elderly; benzodiazepine, short-to-intermediate acting) 4, 1

Step 3: Second-Line Options

If first-line BzRAs fail or are contraindicated:

  • Low-dose doxepin 3-6 mg at bedtime for sleep maintenance insomnia (sedating antidepressant with histamine antagonism) 1, 3, 2
  • Suvorexant (orexin receptor antagonist) for sleep maintenance 1, 2
  • Consider alternative BzRAs with different duration of action based on residual symptoms 4

For patients with comorbid depression or anxiety:

  • Sedating antidepressants such as trazodone, mirtazapine, or amitriptyline may be considered, though evidence for efficacy is relatively weak 4, 1
  • Note that low-dose sedating antidepressants do not constitute adequate treatment for major depression 4

Step 4: Agents NOT Recommended

  • Trazodone is NOT recommended for sleep onset or maintenance insomnia by current guidelines 1
  • Over-the-counter antihistamines (diphenhydramine) are not recommended due to lack of efficacy data and safety concerns 1, 2
  • Herbal supplements (valerian) and melatonin supplements lack sufficient evidence 1
  • Antipsychotics (quetiapine) are not recommended as first-line due to metabolic side effects 3, 2
  • Barbiturates and chloral hydrate are not recommended 1

Critical Safety Considerations

Duration of Use:

  • FDA approval is for short-term use only (4-5 weeks) for most hypnotics 2
  • Eszopiclone has no short-term usage restriction and has been studied for up to 6 months 4, 6
  • Use the lowest effective dose for the shortest duration necessary 2

Next-Day Impairment:

  • Eszopiclone 3 mg causes next-morning psychomotor and memory impairment that persists up to 11.5 hours post-dose, even when patients don't subjectively perceive impairment 6
  • Zolpidem shows small but statistically significant decreases in performance on cognitive testing 5
  • FDA labels warn of daytime impairment, "sleep driving," behavioral abnormalities, and worsening depression 2

Serious Risks:

  • Hypnotic drugs are associated with dementia, injury, fractures, dependence, withdrawal reactions, and cognitive impairment, particularly in older adults 1, 2
  • Anterograde amnesia can occur, predominantly at doses above 10 mg for zolpidem 5

Common Pitfalls to Avoid

  • Never use benzodiazepines like lorazepam or clonazepam as first-line treatment—these are second or third-line options only 1
  • Don't prescribe medications without implementing CBT-I techniques alongside pharmacotherapy 1, 7
  • Avoid combining multiple sedative medications, which increases adverse effect risk 3
  • Don't continue long-term pharmacotherapy without periodic reassessment and attempts at tapering 1, 2
  • Don't ignore drug interactions and contraindications, particularly in elderly patients 1
  • Avoid using sedating agents without matching them to the specific sleep complaint (onset vs. maintenance) 1

Medication Selection Nuances

The 2008 AASM guideline provides a practical framework: if a patient on a shorter-acting agent continues to complain of wake after sleep onset (WASO), prescribe a drug with longer half-life; if a patient complains of residual sedation, prescribe a shorter-acting drug 4

Flurazepam is rarely prescribed due to its extended half-life and risk of residual daytime drowsiness 4

Ramelteon offers unique advantages for patients with substance use history due to lower abuse potential, though evidence quality is lower than for BzRAs 2

References

Guideline

Pharmacotherapy of Insomnia

Praxis Medical Insights: Practical Summaries of Clinical Guidelines, 2025

Guideline

Treatment of Insomnia

Praxis Medical Insights: Practical Summaries of Clinical Guidelines, 2025

Guideline

Management of Persistent Insomnia Unresponsive to Multiple Medications

Praxis Medical Insights: Practical Summaries of Clinical Guidelines, 2025

Guideline

Guideline Directed Topic Overview

Dr.Oracle Medical Advisory Board & Editors, 2025

Professional Medical Disclaimer

This information is intended for healthcare professionals. Any medical decision-making should rely on clinical judgment and independently verified information. The content provided herein does not replace professional discretion and should be considered supplementary to established clinical guidelines. Healthcare providers should verify all information against primary literature and current practice standards before application in patient care. Dr.Oracle assumes no liability for clinical decisions based on this content.

Have a follow-up question?

Our Medical A.I. is used by practicing medical doctors at top research institutions around the world. Ask any follow up question and get world-class guideline-backed answers instantly.