What medications are used to treat 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: December 12, 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.

Medications for Insomnia

First-Line Treatment: Cognitive Behavioral Therapy

Before any medication is prescribed, Cognitive Behavioral Therapy for Insomnia (CBT-I) should be offered as the initial treatment for chronic insomnia, as it demonstrates superior long-term outcomes with sustained benefits after discontinuation and fewer adverse effects compared to pharmacotherapy. 1, 2

First-Line Pharmacological Agents

When CBT-I fails or is unavailable, the American Academy of Sleep Medicine recommends short-to-intermediate acting benzodiazepine receptor agonists (BzRAs) or ramelteon as first-line medications 1, 2:

For Sleep-Onset Insomnia:

  • Ramelteon 8 mg at bedtime carries zero addiction potential and is particularly suitable for patients with substance use history 1, 2, 3
  • Zaleplon 10 mg has a very short half-life with minimal residual sedation 1, 2
  • Zolpidem 10 mg (5 mg in elderly) is FDA-approved and effective for reducing sleep latency 2, 4

For Sleep-Maintenance Insomnia:

  • Low-dose doxepin 3-6 mg is particularly effective with minimal side effects and no addiction potential 1, 2
  • Eszopiclone 2-3 mg is FDA-approved for both sleep onset and maintenance, with demonstrated efficacy up to 6 months 2, 5, 6

For Both Onset and Maintenance:

  • Eszopiclone 2-3 mg is the preferred choice as it addresses both components without developing rapid tolerance 2, 5, 6
  • Zolpidem 10 mg (5 mg in elderly) is effective for both components 2, 4
  • Temazepam 15 mg is a traditional benzodiazepine option, though carries higher risks than non-benzodiazepine alternatives 2

Second-Line Options

If initial BzRAs or ramelteon fail, try an alternate agent from the same class before moving to other drug categories 2:

  • Sedating antidepressants (trazodone, amitriptyline, higher-dose doxepin, mirtazapine) become appropriate when treating concurrent depression or anxiety 1, 2
  • These should be reserved for patients with comorbid psychiatric conditions that would benefit from their primary mechanism of action 1

Medications to Explicitly Avoid

The American Academy of Sleep Medicine explicitly recommends against 1, 2:

  • Over-the-counter antihistamines (diphenhydramine) due to anticholinergic effects, lack of efficacy data, and safety concerns 2
  • Melatonin supplements 2 mg due to insufficient evidence for efficacy 2
  • Valerian and herbal supplements due to lack of efficacy and safety data 2
  • Atypical antipsychotics (including olanzapine, quetiapine) for primary insomnia due to weak evidence and significant adverse effects 1
  • Barbiturates and chloral hydrate due to unacceptable safety profiles 2

Special Population: Elderly Patients

For elderly patients, low-dose doxepin 3-6 mg is the most appropriate first choice for sleep maintenance insomnia, with ramelteon 8 mg preferred for sleep-onset difficulties. 7

Dose Adjustments for Elderly:

  • Zolpidem: 5 mg (not 10 mg) 7
  • Eszopiclone: 1-2 mg (not 3 mg) 7
  • Zaleplon: 5 mg (not 10 mg) 7

Absolutely Avoid in Elderly:

  • All benzodiazepines due to unacceptable risks of dependency, falls, cognitive impairment, respiratory depression, and increased dementia risk per American Geriatrics Society Beers Criteria 7
  • Antihistamine-containing sleep aids due to strong anticholinergic effects 7
  • Trazodone despite widespread off-label use, due to limited efficacy evidence 7

Critical Prescribing Principles

  • Use the lowest effective dose for the shortest necessary duration with follow-up every few weeks initially to assess effectiveness and side effects 2
  • Consider intermittent dosing (e.g., three nights per week) or as-needed use to reduce tolerance and dependence 2
  • Combine with ongoing behavioral strategies rather than using medication in isolation 2, 7
  • Taper medication when conditions allow, with CBT-I facilitating successful discontinuation 2
  • Patient education is mandatory regarding treatment goals, realistic expectations, safety concerns, potential side effects, risk of dosage escalation, and potential for rebound insomnia upon discontinuation 2

Common Pitfalls to Avoid

  • Do not use long-acting benzodiazepines (lorazepam) due to accumulation, active metabolites, and impaired clearance in elderly and hepatically impaired patients 1
  • Do not prescribe traditional benzodiazepines when non-benzodiazepine alternatives exist, as they carry higher risks of tolerance, dependence, and severe withdrawal 1, 8
  • Do not continue pharmacotherapy indefinitely without regular reassessment—long-term use should only be considered for severe/refractory insomnia with consistent follow-up 2
  • Do not ignore the black box FDA warnings about serious injuries from complex sleep behaviors (sleepwalking, sleep driving) with BzRAs—counsel all patients on these risks 7

References

Guideline

Tratamento da Insônia com Zolpidem

Praxis Medical Insights: Practical Summaries of Clinical Guidelines, 2025

Guideline

Pharmacological Management of Insomnia

Praxis Medical Insights: Practical Summaries of Clinical Guidelines, 2025

Guideline

Best Medication for Elderly Patients with Insomnia

Praxis Medical Insights: Practical Summaries of Clinical Guidelines, 2025

Research

Non-benzodiazepines for the treatment of insomnia.

Sleep medicine reviews, 2000

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.