What medications can help with sleep and anxiety?

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 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 Sleep and Anxiety

Cognitive Behavioral Therapy for Insomnia (CBT-I) should be the initial treatment for chronic insomnia, and when anxiety is comorbid, SSRIs like sertraline combined with CBT-I provide the most effective approach for addressing both conditions simultaneously. 1, 2, 3

First-Line Treatment Approach

Non-Pharmacological Treatment (Start Here)

  • CBT-I is the gold standard first-line treatment for chronic insomnia before any medication is considered, demonstrating superior long-term efficacy compared to pharmacotherapy with minimal adverse effects 1, 2, 3
  • CBT-I components include stimulus control therapy, sleep restriction, cognitive restructuring of maladaptive sleep thoughts, relaxation techniques, and sleep hygiene education 1, 3
  • For anxiety disorders, CBT should be implemented concurrently with any pharmacological intervention 4, 5
  • Sleep hygiene education alone is insufficient but should be combined with other behavioral techniques 2, 3

When Anxiety is the Primary Problem

  • SSRIs (particularly sertraline) are first-line pharmacotherapy for anxiety disorders and do not worsen sleep architecture when combined with behavioral interventions 4, 6
  • Sertraline addresses both anxiety and associated sleep disturbances without the dependency risks of benzodiazepines 4, 6
  • Avoid benzodiazepines as first-line treatment due to dependency potential, cognitive impairment, falls (especially in older adults), and worsening of sleep architecture long-term 2, 4, 3

Second-Line Pharmacological Options for Insomnia

When CBT-I Alone is Insufficient

Use the lowest effective dose for the shortest duration (typically 4-5 weeks maximum) 2, 3

For Sleep Onset Difficulty:

  • Zolpidem 5-10 mg (5 mg in elderly) at bedtime 2
  • Zaleplon 10 mg at bedtime 2
  • Ramelteon 8 mg at bedtime (melatonin receptor agonist with no abuse potential) 2
  • Triazolam 0.25 mg (not first-line due to rebound anxiety risk) 2

For Sleep Maintenance Difficulty:

  • Eszopiclone 2-3 mg at bedtime 2
  • Temazepam 15 mg at bedtime 2
  • Low-dose doxepin 3-6 mg (particularly effective for sleep maintenance) 2, 3
  • Suvorexant (orexin receptor antagonist) 2

For Comorbid Depression/Anxiety with Insomnia:

  • Mirtazapine 7.5-30 mg at bedtime (sedating antidepressant) 1, 3
  • Trazodone 25-100 mg at bedtime (though not recommended by some guidelines as monotherapy for insomnia) 1, 2

Medications to AVOID

Not Recommended Due to Safety/Efficacy Concerns:

  • Over-the-counter antihistamines (diphenhydramine) - lack of efficacy data, daytime sedation, delirium risk especially in elderly 2, 3
  • Antipsychotics as first-line - problematic metabolic side effects outweigh benefits 2, 3
  • Long-acting benzodiazepines - increased risks without clear benefit 2
  • Herbal supplements (valerian) and melatonin - insufficient evidence of efficacy 2
  • Barbiturates and chloral hydrate - outdated with significant safety concerns 2

Treatment Algorithm

Step 1: Initial Assessment and Non-Pharmacological Intervention

  • Implement CBT-I for all patients with chronic insomnia (≥3 nights/week for ≥4 weeks) 1, 3
  • Continue for at least 4-8 weeks to evaluate effectiveness 3
  • If anxiety is prominent, consider SSRI (sertraline) alongside CBT-I 4, 6

Step 2: Add Pharmacotherapy if CBT-I Insufficient

  • For isolated insomnia without anxiety: Select medication based on sleep pattern (onset vs. maintenance) 2, 3
  • For insomnia with anxiety: Continue SSRI, add short-term sleep medication if needed (zolpidem, eszopiclone, or low-dose doxepin) 2, 4
  • Start with lowest effective dose 2, 3
  • Limit duration to 4-5 weeks when possible 2, 3

Step 3: Reassessment and Adjustment

  • Monitor regularly for treatment response, adverse effects, and potential misuse 2, 3
  • Taper medications when conditions allow to prevent discontinuation symptoms 2
  • Continue behavioral techniques even when using medications 2, 3

Critical Pitfalls to Avoid

  • Never use benzodiazepines (including lorazepam) as first-line treatment - they carry significant risks of dependence, withdrawal, cognitive impairment, and falls, particularly in older adults 2, 4, 3
  • Do not continue pharmacotherapy long-term without periodic reassessment - insomnia medications are FDA-approved for short-term use only 2, 3
  • Avoid using sedating agents without considering sleep onset vs. maintenance pattern - medication selection should match the specific sleep complaint 2
  • Do not prescribe sleep medications without implementing behavioral interventions - combining approaches provides better outcomes than medication alone 1, 3
  • Never abruptly discontinue sleep medications - taper gradually to avoid rebound insomnia, anxiety, irritability, and other withdrawal symptoms 2

Special Considerations

Older Adults:

  • Start with half the standard dose (e.g., zolpidem 5 mg instead of 10 mg) 2
  • Higher risk for adverse effects including falls, cognitive impairment, and delirium 1, 2
  • Particularly avoid antihistamines and long-acting benzodiazepines 2, 3

Patients with Substance Use History:

  • Avoid benzodiazepines entirely due to high abuse potential 3
  • Consider ramelteon (no abuse potential) or low-dose doxepin 2, 3
  • Emphasize CBT-I as primary intervention 3

Monitoring Parameters:

  • Assess for residual daytime sedation, memory impairment, and behavioral abnormalities including "sleep driving" with benzodiazepine receptor agonists 3
  • Monitor for drug interactions, particularly with CYP3A4 inhibitors/inducers 7
  • Check for signs of medication misuse or escalating doses 3

References

Guideline

Guideline Directed Topic Overview

Dr.Oracle Medical Advisory Board & Editors, 2025

Guideline

Pharmacotherapy of Insomnia

Praxis Medical Insights: Practical Summaries of Clinical Guidelines, 2025

Guideline

Insomnia Treatment Guidelines

Praxis Medical Insights: Practical Summaries of Clinical Guidelines, 2025

Guideline

Best Medication for Panic Disorder in Patient with Insomnia and Hypertension

Praxis Medical Insights: Practical Summaries of Clinical Guidelines, 2025

Research

Sleep and anxiety disorders.

The Psychiatric clinics of North America, 2006

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.