What is the recommended algorithm for managing 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 7, 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.

Insomnia Management Algorithm

Cognitive Behavioral Therapy for Insomnia (CBT-I) is the mandatory first-line treatment for all adults with chronic insomnia disorder, and pharmacotherapy should only be considered after CBT-I has been attempted or as a short-term adjunct during CBT-I implementation. 1, 2

Step 1: Initial Treatment - CBT-I (First-Line for All Patients)

All patients with chronic insomnia must begin with CBT-I, which demonstrates superior long-term efficacy compared to medications and sustained benefits up to 2 years without risk of tolerance, dependence, or adverse effects. 1, 2, 3

Core CBT-I Components (Implement All):

  • Sleep Restriction Therapy: Limit time in bed to match actual sleep duration from sleep diary (minimum 5 hours), then adjust weekly based on sleep efficiency (SE%). If SE >85-90%, increase time in bed by 15-20 minutes; if SE <80%, decrease by 15-20 minutes. 1, 4

  • Stimulus Control: Go to bed only when sleepy; use bed only for sleep and sex; leave bed after 20 minutes of perceived wakefulness (no clock-watching); maintain consistent wake time daily; eliminate daytime naps. 1

  • Cognitive Therapy: Address dysfunctional beliefs such as "I can't sleep without medication," "My life will be ruined if I can't sleep," using Socratic questioning and behavioral experiments. 1, 4

  • Relaxation Training: Progressive muscle relaxation involving systematic tensing and relaxing of muscle groups. 1

CBT-I Delivery Options:

  • Standard format: 4-8 sessions with trained specialist 4
  • Brief Behavioral Therapy: 2-4 sessions emphasizing behavioral components when resources limited 5
  • Alternative delivery: Individual, group, telephone, web-based modules, or self-help books 1

Important Contraindications for Sleep Restriction:

  • High-risk occupations requiring alertness 4
  • Predisposition to mania/hypomania 4
  • Poorly controlled seizure disorders 4

Step 2: Pharmacotherapy (Only After CBT-I Unsuccessful or as Short-Term Adjunct)

Medications should only be added when patients cannot participate in CBT-I, still have symptoms despite CBT-I, or as temporary adjunct to CBT-I. 2 Use shared decision-making discussing benefits, harms, and costs. 1

First-Line Pharmacotherapy Selection Algorithm:

For Sleep Onset Insomnia:

  • Zaleplon 10 mg (5 mg elderly) 5
  • Zolpidem 10 mg (5 mg elderly) 5, 6
  • Ramelteon 8 mg 5
  • Triazolam 0.25 mg (associated with rebound anxiety, not preferred) 5

For Sleep Maintenance Insomnia:

  • Eszopiclone 2-3 mg 5
  • Zolpidem 10 mg (5 mg elderly) 5, 6
  • Temazepam 15 mg (7.5 mg elderly or debilitated) 5, 7
  • Suvorexant (orexin antagonist) 1, 5

For Both Sleep Onset and Maintenance:

  • Eszopiclone 2-3 mg 5
  • Zolpidem 10 mg (5 mg elderly) 5, 6
  • Temazepam 15 mg 5, 7

Second-Line Pharmacotherapy:

If first-line BzRAs unsuccessful or contraindicated:

  • Low-dose doxepin 3-6 mg for sleep maintenance 1, 5
  • Sedating antidepressants (trazodone, mirtazapine, amitriptyline) when comorbid depression/anxiety present 1, 5

Alternative BzRAs within same class if initial agent unsuccessful, considering patient's response pattern (e.g., switch to longer half-life if wake after sleep onset persists, shorter-acting if residual sedation occurs). 1

Critical Medication Principles:

  • Use lowest effective dose for shortest duration possible (typically <4 weeks for acute insomnia) 5
  • Short-term use only due to risks of tolerance, dependence, cognitive impairment, falls, and fractures, especially in older adults 1, 2
  • Always supplement with behavioral/cognitive therapies when using medications 5
  • Taper gradually when discontinuing to prevent withdrawal reactions 7
  • Regular monitoring required during initial treatment and periodic reassessment for long-term use 2, 5

Step 3: Agents NOT Recommended

Avoid these medications due to lack of efficacy data or safety concerns:

  • Over-the-counter antihistamines (diphenhydramine): Risk of daytime sedation and delirium, especially in older adults 2, 5
  • Herbal supplements (valerian) and melatonin: Insufficient evidence of efficacy 1, 5
  • Trazodone: Not recommended by American Academy of Sleep Medicine 5
  • Antipsychotics: Not first-line due to problematic metabolic side effects 2
  • Long-acting benzodiazepines (flurazepam): Increased risks without clear benefit 1, 5
  • Barbiturates and chloral hydrate: Not recommended 5

Common Pitfalls to Avoid

  • Starting with medication instead of CBT-I: This violates guideline recommendations and misses the only treatment with durable long-term effects. 1, 2
  • Using benzodiazepines not approved for insomnia (lorazepam, clonazepam) as first-line: These are second or third-line options only. 1, 5
  • Continuing pharmacotherapy long-term without reassessment: Increases risks of dependence, cognitive impairment, and falls without proven long-term efficacy. 2, 5
  • Prescribing sleep hygiene education alone: Insufficient as monotherapy for chronic insomnia, though should be included in comprehensive approach. 1, 2
  • Failing to implement CBT-I alongside medication: Medications alone lack durability after discontinuation. 8
  • Clock-watching during stimulus control: Patients should use perceived time (approximately 20 minutes), not actual clock-watching. 1

Special Populations

Older Adults:

  • Extra caution with all medications due to increased risk of falls, cognitive impairment, and adverse effects 2
  • Start with lower doses: zolpidem 5 mg, temazepam 7.5 mg 5, 6, 7
  • CBT-I remains highly effective and preferred 1, 9

Comorbid Depression/Anxiety:

  • Consider sedating antidepressants (mirtazapine, doxepin, amitriptyline) 1, 5
  • CBT-I still effective for secondary insomnia 9

References

Guideline

Guideline Directed Topic Overview

Dr.Oracle Medical Advisory Board & Editors, 2025

Guideline

Insomnia Treatment Guidelines

Praxis Medical Insights: Practical Summaries of Clinical Guidelines, 2025

Guideline

Cognitive Behavioral Therapy for Chronic Insomnia

Praxis Medical Insights: Practical Summaries of Clinical Guidelines, 2025

Guideline

Pharmacotherapy of Insomnia

Praxis Medical Insights: Practical Summaries of Clinical Guidelines, 2025

Research

Insomnia.

Lancet (London, England), 2022

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.