What medications are recommended for treating insomnia 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: September 3, 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.

Treatment of Insomnia and Anxiety

Cognitive Behavioral Therapy for Insomnia (CBT-I) should be the first-line treatment for patients with both insomnia and anxiety, with pharmacological options added only when necessary. 1

First-Line Treatment: CBT-I

CBT-I is strongly recommended as the initial treatment for all adults with chronic insomnia disorder, with moderate-quality evidence showing improvement in:

  • Global sleep outcomes
  • Sleep efficiency
  • Sleep quality
  • Overall functioning

CBT-I components include:

  • Sleep restriction therapy
  • Stimulus control
  • Cognitive therapy targeting dysfunctional beliefs about sleep
  • Sleep hygiene education
  • Relaxation techniques

Research shows that CBT-I is not only effective for insomnia but also equally effective in reducing anxiety symptoms compared to anxiety-focused treatments 2. This makes it an ideal first-line approach for comorbid insomnia and anxiety.

Pharmacological Options for Insomnia with Anxiety

When CBT-I alone is insufficient, pharmacological treatment may be added using a shared decision-making approach. The following medications are recommended based on symptom presentation:

For Sleep Onset Insomnia:

  • Zolpidem: 10mg for adults, 5mg for elderly
  • Zaleplon: 10mg
  • Ramelteon: 8mg (well-tolerated with low abuse potential)

For Sleep Maintenance Insomnia:

  • Doxepin (3-6mg): Effective for sleep maintenance with modest improvement in sleep onset
  • Eszopiclone: 2-3mg (1mg for elderly patients)
  • Temazepam: 15mg
  • Suvorexant: 10-20mg

Important Considerations for Medication Selection

  1. Safety profile:

    • Ramelteon has a favorable safety profile with low abuse potential
    • Low-dose eszopiclone (1mg) is preferred for elderly patients with fall risk
    • Avoid benzodiazepines in patients with conditions that may worsen with cognitive impairment
  2. Duration of treatment:

    • Use the lowest effective dose for the shortest duration
    • Schedule follow-up within 7-10 days to evaluate response
  3. Discontinuation:

    • Gradual tapering is recommended when discontinuing medications to prevent withdrawal symptoms

Treatment Algorithm

  1. Start with CBT-I for all patients with insomnia and anxiety
  2. Assess response after 4-6 weeks
  3. If inadequate response, add appropriate medication based on:
    • Primary symptom (sleep onset vs. maintenance)
    • Patient age and comorbidities
    • Risk of side effects and drug interactions
  4. Monitor and adjust treatment:
    • Evaluate efficacy and side effects
    • Consider tapering medication once stable improvement is achieved
    • Continue CBT-I techniques long-term

Cautions and Pitfalls

  • Benzodiazepines should be avoided in patients with certain conditions due to risk of cognitive impairment and potential for worsening depression 1
  • Higher doses of eszopiclone may increase risk of next-day impairment affecting driving and activities requiring alertness
  • Doxylamine is not recommended due to poor efficacy and potential side effects, particularly in older adults
  • Antidepressants (like trazodone) are often prescribed off-label for insomnia despite limited efficacy data 3
  • When discontinuing medications, gradual tapering is essential to prevent withdrawal symptoms and rebound insomnia

Special Considerations for Anxiety

While treating insomnia in patients with anxiety:

  • CBT-I has been shown to reduce both insomnia and anxiety symptoms 2, 4
  • Sleep problems may persist after anxiety treatment, suggesting that CBT-I may be warranted during or after CBT for anxiety 5
  • For patients with severe anxiety symptoms, addressing both conditions simultaneously may be necessary

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.