What are the best medications 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: December 5, 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 Medications for Insomnia

Cognitive Behavioral Therapy for Insomnia (CBT-I) should be the initial treatment for all adults with chronic insomnia before any medication is prescribed, as it demonstrates superior long-term efficacy compared to all pharmacological options with minimal risk of adverse effects. 1, 2

When Pharmacotherapy Is Necessary

If CBT-I is insufficient, unavailable, or the patient cannot participate, medications should be added as a supplement—not a replacement—to behavioral interventions. 1, 2

First-Line Medication Options

The recommended sequence begins with short-intermediate acting benzodiazepine receptor agonists (BzRAs) or ramelteon: 3, 2

For Sleep Onset Difficulty:

  • Zolpidem 10 mg (5 mg in elderly) - effective for both sleep onset and maintenance 2, 4
  • Zaleplon 10 mg - specifically for sleep onset 2
  • Ramelteon 8 mg - melatonin receptor agonist with no abuse potential, making it ideal for patients with substance use history 2, 5
  • Triazolam 0.25 mg - though associated with rebound anxiety, not truly first-line 2

For Sleep Maintenance Difficulty:

  • Eszopiclone 2-3 mg - effective for both onset and maintenance 2, 6
  • Temazepam 15 mg - effective for both onset and maintenance 2
  • Zolpidem 10 mg (5 mg in elderly) - also effective for maintenance 2

Second-Line Medication Options

If first-line BzRAs or ramelteon fail, consider: 3, 2

  • Low-dose doxepin 3-6 mg - specifically for sleep maintenance insomnia with strong evidence 1, 2
  • Suvorexant (orexin receptor antagonist) - for sleep maintenance, works through completely different mechanism than BzRAs 1, 2
  • Sedating antidepressants (trazodone, amitriptyline, mirtazapine) - particularly when comorbid depression/anxiety exists 3, 2

Important caveat: Trazodone is specifically NOT recommended by the American Academy of Sleep Medicine despite widespread use. 2

Third-Line Options (Comorbid Conditions Only)

  • Combined BzRA/ramelteon with sedating antidepressant 3
  • Anti-epilepsy medications (gabapentin) - only suitable when patients may benefit from primary drug action 3
  • Atypical antipsychotics (quetiapine, olanzapine) - NOT recommended as first-line due to problematic metabolic side effects 3, 1

Medications to Avoid

Never recommend these agents: 3, 2

  • Over-the-counter antihistamines (diphenhydramine) - lack efficacy data and cause daytime sedation, delirium in elderly 3, 2
  • Herbal supplements (valerian) and melatonin supplements - insufficient evidence of efficacy 3, 2
  • Barbiturates and chloral hydrate - outdated with unacceptable safety profiles 3, 2
  • Tiagabine - specifically not recommended by American Academy of Sleep Medicine 2

Critical Safety Considerations

All hypnotics carry significant risks that must be discussed with patients: 1

  • Next-day impairment - psychomotor and memory impairment can persist 7.5-11.5 hours after dosing, even when patients don't perceive sedation 6
  • Complex sleep behaviors - sleep-driving, sleep-walking 1
  • Falls and fractures - particularly in elderly 1
  • Cognitive impairment and potential dementia risk 1
  • Dependence and withdrawal - especially with benzodiazepines 2

FDA approval is for short-term use only (4-5 weeks). 1 Medications should be prescribed at the lowest effective dose for the shortest duration possible. 1, 2

Special Population: Patients with Substance Use History

For patients with history of opioid or other substance abuse: 5

  • Avoid all benzodiazepines due to high abuse potential and respiratory depression risk 5
  • Ramelteon is the preferred medication due to lack of abuse potential 2, 5
  • Suvorexant may be considered as alternative 2
  • Low-dose doxepin for sleep maintenance 5
  • CBT-I remains absolutely essential in this population 5

Treatment Algorithm

  1. Implement CBT-I first - includes stimulus control, sleep restriction, cognitive therapy, sleep hygiene education 1, 2, 7

  2. If CBT-I insufficient after adequate trial, add pharmacotherapy based on symptom pattern: 2

    • Sleep onset → zolpidem, zaleplon, or ramelteon
    • Sleep maintenance → eszopiclone, temazepam, doxepin, or suvorexant
    • Substance use history → ramelteon preferred
  3. If first-line medication fails, try alternative agent in same class before moving to second-line 3, 2

  4. Continue behavioral interventions even when using medications 3, 1

  5. Monitor regularly - every few weeks initially for effectiveness, side effects, and need for ongoing medication 3

  6. Taper when conditions allow - medication discontinuation is facilitated by concurrent CBT-I 3

Common Pitfalls to Avoid

  • Starting with medication instead of CBT-I - violates evidence-based guidelines 1, 2
  • Using long-acting benzodiazepines - increased risks without clear benefit 1
  • Prescribing OTC antihistamines - lack efficacy data and problematic side effects 3, 2
  • Failing to assess for underlying sleep disorders - sleep apnea, restless legs syndrome must be ruled out if insomnia persists beyond 7-10 days 2
  • Combining multiple sedatives - significantly increases risk of falls, cognitive impairment, complex sleep behaviors 2
  • Continuing long-term without reassessment - regular monitoring is essential 3, 2
  • Ignoring patient's subjective perception of impairment - objective impairment can exist even when patient feels fine 6

References

Guideline

Treatment of Insomnia

Praxis Medical Insights: Practical Summaries of Clinical Guidelines, 2025

Guideline

Pharmacotherapy of Insomnia

Praxis Medical Insights: Practical Summaries of Clinical Guidelines, 2025

Guideline

Guideline Directed Topic Overview

Dr.Oracle Medical Advisory Board & Editors, 2025

Guideline

Treatment of Insomnia in Patients with History of Heroin Use

Praxis Medical Insights: Practical Summaries of Clinical Guidelines, 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.