What is the best medication to treat an adult with anxiety and insomnia who has no contraindications or serious medical problems?

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: February 23, 2026View 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 Medication for Anxiety and Insomnia

For an adult with both anxiety and insomnia, low-dose doxepin (3–6 mg at bedtime) is the optimal first-line pharmacologic choice after initiating Cognitive Behavioral Therapy for Insomnia (CBT-I), because it effectively treats sleep-maintenance problems without abuse potential while allowing concurrent treatment of anxiety with an SSRI or buspirone. 1

Foundational Non-Pharmacologic Therapy

Before prescribing any medication, all adults with chronic insomnia must receive CBT-I as the standard of care—this is a strong recommendation from both the American Academy of Sleep Medicine and the American College of Physicians. 1 CBT-I provides superior long-term efficacy compared to medications alone, with sustained benefits after treatment ends, whereas medication effects cease when stopped. 1

Core CBT-I components include:

  • Stimulus control therapy (use bed only for sleep; leave bed if unable to sleep within 20 minutes) 1
  • Sleep restriction therapy (limit time in bed to actual sleep time plus 30 minutes) 1
  • Relaxation techniques (progressive muscle relaxation, guided imagery, breathing exercises) 1
  • Cognitive restructuring (modify negative beliefs about sleep) 1
  • Sleep hygiene education (avoid caffeine ≥6 hours before bed, maintain consistent sleep-wake times, limit screen time in evening) 1

First-Line Pharmacologic Approach

For Sleep-Maintenance Insomnia

Low-dose doxepin (3–6 mg) is the preferred first-line hypnotic for patients with combined anxiety and insomnia because it addresses sleep maintenance without dependence risk, allowing you to treat anxiety separately with appropriate agents. 1, 2

Start with 3 mg at bedtime; if insufficient after 1–2 weeks, increase to 6 mg. 2 This dosing provides:

  • 22–23 minute reduction in wake after sleep onset (95% CI: 14–30 minutes) 1, 2
  • 26–32 minute increase in total sleep time (95% CI: 18–40 minutes) 1, 2
  • Small-to-moderate improvements in sleep efficiency and quality 1, 2
  • Adverse event rates comparable to placebo (most common: mild somnolence, headache) 2
  • No anticholinergic effects, cognitive impairment, or fall risk at these doses 2
  • Maintained efficacy up to 12 weeks without tolerance or withdrawal 2

For Anxiety Management

Treat anxiety separately with an SSRI (e.g., sertraline) or buspirone, not with benzodiazepines, because combining low-dose doxepin with these agents avoids the dangerous polypharmacy of multiple sedating medications. 1 Sertraline has lower QTc prolongation risk than citalopram/escitalopram in patients with cardiovascular concerns. 1

For Sleep-Onset Insomnia (If Predominant)

If the patient primarily struggles with falling asleep rather than staying asleep:

  • Ramelteon 8 mg is preferred for patients with substance use history (no abuse potential, not DEA-scheduled) 1, 3
  • Zaleplon 10 mg (5 mg if age ≥65 years) for rapid sleep initiation with minimal next-day sedation 1
  • Zolpidem 10 mg (5 mg if age ≥65 years) reduces sleep latency by ~25 minutes 1

Medications to Explicitly Avoid

Benzodiazepines (Lorazepam, Clonazepam, Temazepam)

Do not use benzodiazepines as first-line treatment despite their effectiveness for both anxiety and insomnia, because they carry unacceptable risks: 1, 3

  • Higher dependency and withdrawal risk (including seizures, rebound anxiety) 1, 4
  • Falls, fractures, and cognitive impairment (especially in elderly) 1
  • Respiratory depression (particularly dangerous with opioids or alcohol) 1
  • Observational associations with dementia 1
  • Long half-lives causing daytime sedation and driving impairment 3

Trazodone

The American Academy of Sleep Medicine explicitly recommends against trazodone for insomnia because it produces only ~10 minute reduction in sleep latency and ~8 minute reduction in wake after sleep onset, with no improvement in subjective sleep quality, and adverse events occur in ~75% of older adults. 1, 5 Harms outweigh minimal benefits. 1

Over-the-Counter Antihistamines

Diphenhydramine and doxylamine are not recommended due to: 1

  • Lack of efficacy data 1
  • Strong anticholinergic effects (confusion, urinary retention, falls, daytime sedation, delirium) 1
  • Tolerance develops within 3–4 days 1

Antipsychotics (Quetiapine, Olanzapine)

Avoid antipsychotics for primary insomnia because evidence is weak and they cause significant harms including weight gain, metabolic syndrome, extrapyramidal symptoms, and increased mortality in elderly with dementia. 1, 3

Melatonin Supplements

Not recommended for chronic insomnia because they produce only ~9 minute reduction in sleep latency with insufficient evidence of efficacy. 1

Treatment Algorithm

Step 1 (Week 0): Initiate CBT-I immediately and assess whether insomnia is primarily sleep-onset or sleep-maintenance. 1

Step 2 (Week 0–1): If CBT-I alone is insufficient after 2–4 weeks, add low-dose doxepin 3 mg at bedtime for sleep-maintenance problems (or ramelteon 8 mg for sleep-onset problems). 1, 2 Simultaneously start an SSRI or buspirone for anxiety. 1

Step 3 (Week 1–2): Reassess sleep parameters (sleep latency, total sleep time, nocturnal awakenings, daytime functioning) and adverse effects. 1 If doxepin 3 mg is well tolerated but insufficient, increase to 6 mg. 2

Step 4 (Week 4): Document continued need for medication; if effective, plan gradual taper while maintaining CBT-I. 1 If ineffective, switch to an alternative agent (e.g., suvorexant 10 mg for sleep-maintenance or eszopiclone 2–3 mg for combined sleep-onset and maintenance). 1

Special Population Considerations

Elderly Patients (≥65 Years)

  • Maximum doses: doxepin ≤6 mg, zolpidem ≤5 mg, eszopiclone ≤2 mg, zaleplon ≤5 mg 1
  • Ramelteon 8 mg or low-dose doxepin 3 mg are safest choices due to minimal fall risk and cognitive impairment 1, 2
  • Avoid long-acting benzodiazepines completely 1

Hepatic Impairment

  • Eszopiclone and zaleplon maximum 2 mg and 5 mg respectively due to reduced clearance 1
  • Doxepin and ramelteon remain safe options 1

Substance Use History

  • Ramelteon is the only appropriate choice due to zero abuse potential and non-DEA-scheduled status 1
  • Avoid all benzodiazepines and Z-drugs 1

Critical Safety Monitoring

Reassess after 1–2 weeks to evaluate: 1

  • Sleep-onset latency, total sleep time, nocturnal awakenings
  • Daytime functioning and quality of life
  • Adverse effects (morning sedation, cognitive impairment, complex sleep behaviors)

Screen for complex sleep behaviors (sleep-driving, sleep-walking, sleep-eating) at every visit; discontinue medication immediately if identified. 1

Use the lowest effective dose for the shortest duration possible (FDA labeling indicates hypnotics are intended for ≤4 weeks for acute insomnia; evidence beyond 4 weeks is limited). 1

Common Pitfalls to Avoid

  • Prescribing hypnotics without first implementing CBT-I leads to less durable benefit and violates strong guideline recommendations 1
  • Using benzodiazepines as first-line treatment for convenience despite superior alternatives 1
  • Combining multiple sedating agents (e.g., adding a benzodiazepine to doxepin) markedly increases risk of respiratory depression, falls, cognitive impairment, and complex sleep behaviors 1
  • Prescribing trazodone despite explicit guideline recommendations against it 1
  • Failing to treat anxiety and insomnia as separate conditions requiring distinct pharmacologic approaches 1
  • Continuing pharmacotherapy long-term without periodic reassessment (every 2–4 weeks) 1

References

Guideline

Pharmacotherapy of Insomnia

Praxis Medical Insights: Practical Summaries of Clinical Guidelines, 2026

Guideline

Use of Doxepin for Sleep Maintenance

Praxis Medical Insights: Practical Summaries of Clinical Guidelines, 2026

Guideline

Tratamento da Insônia com Zolpidem

Praxis Medical Insights: Practical Summaries of Clinical Guidelines, 2026

Research

Antidepressants for insomnia in adults.

The Cochrane database of systematic reviews, 2018

Related Questions

What's the next step for a patient with insomnia, taking Adderall (amphetamine) IR 20mg, who has tried Seroquel (quetiapine), Lunesta (eszopiclone), Trazodone, and Tempazepam (temazepam) without success?
What is the best medication for early awakening insomnia?
In an 89‑year‑old patient with chronic insomnia affecting sleep onset and maintenance who has failed trazodone (causing dyspnea and next‑day hangover) and mirtazapine 30 mg nightly (with similar side effects and inadequate sleep), what pharmacologic alternatives are appropriate?
Can sertraline (selective serotonin reuptake inhibitor) be used to treat insomnia?
What is the best sleep medication for a patient with depression taking two antidepressants?
What is the duration of effectiveness for intrauterine devices (IUDs)?
What is a nephrostogram, how is it performed, when is it indicated, what are the normal and abnormal imaging findings, possible complications, and subsequent management?
What medication adjustments and follow‑up plan are recommended for an adult female with recurrent major depressive disorder on fluoxetine 20 mg daily and trazodone 25‑50 mg nightly who now has worsening low mood, early‑morning awakenings at 3 am, obstructive sleep apnea treated with CPAP, elevated thyroid‑stimulating hormone, prediabetes, and pending pharmacogenomic testing?
What is the appropriate evaluation and management for a urine specimen that shows >10^4 CFU/mL gram‑negative bacilli with two distinct colony morphotypes?
What are the recommended upper age limits for PSA screening in men and for average‑risk colonoscopy screening?
What is the appropriate intervention for a 19‑month‑old girl who is near the gross‑motor developmental cutoff but otherwise age‑appropriate in all other screening domains?

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.