One-liner#
Evaluate insomnia to identify underlying causes and comorbidities, prioritize CBT-I as first-line treatment, and use medications judiciously while avoiding long-term hypnotic dependence.
Quick nav#
- Red flags / send to ED
- Key history
- Focused exam
- Differential (quick pattern recognition)
- Workup
- Initial management
- Management by diagnosis
- Follow-up
- Patient instructions
- Smartphrase snippets
Red flags / send to ED#
- Insomnia rarely requires ED evaluation
Urgent (not ED, but expedited):
- Severe sleep deprivation with safety concerns (driving, operating machinery)
- Insomnia with active suicidal ideation
- Suspected severe sleep apnea with daytime somnolence and safety risk
Key history#
Characterize the insomnia:
- Sleep-onset insomnia: trouble falling asleep (>30 min)
- Sleep-maintenance insomnia: frequent awakenings, trouble returning to sleep
- Early morning awakening: waking too early, can’t return to sleep
- Duration: acute (<3 months) vs chronic (≥3 months, ≥3 nights/week)
Sleep diary (ask patient to keep for 1-2 weeks):
- Bedtime and wake time
- Time to fall asleep
- Number and duration of awakenings
- Total sleep time
- Daytime naps
- Caffeine, alcohol, medication use
Sleep hygiene assessment:
- Consistent sleep/wake times?
- Screen use before bed (phone, TV, computer)
- Caffeine intake and timing
- Alcohol use (disrupts sleep architecture)
- Exercise timing (late exercise can disrupt sleep)
- Bedroom environment (dark, cool, quiet)
- Bed used only for sleep and sex?
Screen for underlying causes:
Psychiatric:
- Depression (early morning awakening classic)
- Anxiety (sleep-onset insomnia, racing thoughts)
- PTSD (nightmares, hypervigilance)
- Mania/hypomania (decreased need for sleep)
Medical:
- Pain (arthritis, neuropathy, cancer)
- Dyspnea (HF, COPD, asthma)
- GERD (nocturnal symptoms)
- Nocturia (BPH, diabetes, diuretics)
- Restless legs syndrome
- Hyperthyroidism
- Menopause (hot flashes)
Sleep disorders:
- Sleep apnea: snoring, witnessed apneas, gasping, morning headaches, daytime sleepiness
- Restless legs syndrome: urge to move legs, worse at rest, worse at night, relieved by movement
- Circadian rhythm disorders: delayed sleep phase (night owl), advanced sleep phase (elderly)
Medications that disrupt sleep:
- Stimulants (methylphenidate, amphetamines)
- Decongestants (pseudoephedrine)
- Beta-blockers (nightmares, sleep disruption)
- Corticosteroids
- SSRIs (can cause insomnia or sedation)
- Diuretics (nocturia)
- Thyroid hormone (if overreplaced)
- Caffeine (including in medications)
Substance use:
- Caffeine: amount, timing (half-life 5-6 hours)
- Alcohol: may help initiate sleep but disrupts sleep architecture
- Cannabis: may help short-term but tolerance develops
- Nicotine: stimulant effect
Focused exam#
General:
- BMI (obesity → sleep apnea risk)
- Signs of sleep deprivation (fatigue, irritability)
HEENT:
- Mallampati score (airway crowding → sleep apnea)
- Neck circumference >17" (men) or >16" (women) → sleep apnea risk
- Nasal obstruction
Cardiovascular:
- Hypertension (associated with sleep apnea)
- Signs of heart failure
Neurologic:
- Restless legs (observe for movements)
- Signs of neuropathy
Psychiatric:
- Mental status exam for depression, anxiety, mania
Differential (quick pattern recognition)#
Common/likely (outpatient)#
| Diagnosis | Keywords patients use | Key clues | Focused exam clues | Initial next step |
|---|---|---|---|---|
| Primary insomnia (chronic insomnia disorder) | “Can’t sleep,” “mind won’t shut off,” “been this way for years” | No clear medical/psychiatric cause; often conditioned arousal; hyperarousal at bedtime | Normal exam | CBT-I first-line; sleep hygiene |
| Insomnia due to depression | “Wake up at 4am and can’t go back,” “don’t enjoy anything” | Early morning awakening; low mood; anhedonia | Flat affect; psychomotor changes | PHQ-9; treat depression (SSRI) |
| Insomnia due to anxiety | “Can’t turn off my brain,” “worry about everything” | Sleep-onset insomnia; racing thoughts; worry | Tense, restless | GAD-7; treat anxiety |
| Poor sleep hygiene | “Watch TV in bed,” “drink coffee at night,” “irregular schedule” | Inconsistent sleep times; screens; caffeine; alcohol | Normal | Sleep hygiene education; sleep diary |
| Medication-induced insomnia | “Started after new medication” | Temporal relationship to medication start | Normal | Review medications; adjust timing or switch |
| Insomnia due to pain | “Pain keeps me awake,” “can’t get comfortable” | Chronic pain condition; pain worse at night | Findings consistent with pain condition | Optimize pain management |
Can’t-miss / urgent#
| Diagnosis | Keywords patients use | Key clues | Focused exam clues | Initial next step |
|---|---|---|---|---|
| Obstructive sleep apnea | “Snoring,” “wife says I stop breathing,” “tired all day” | Snoring, witnessed apneas, morning headaches, daytime sleepiness, obesity | Obesity; large neck; crowded airway | STOP-BANG score; refer for sleep study |
| Restless legs syndrome | “Legs won’t stop moving,” “creepy-crawly feeling,” “have to move” | Urge to move legs; worse at rest; worse at night; relieved by movement | May see leg movements | Check ferritin; dopamine agonist or gabapentin |
| Circadian rhythm disorder | “Night owl,” “can’t fall asleep until 2am,” “sleep fine on weekends” | Delayed sleep phase (young); advanced sleep phase (elderly) | Normal | Light therapy; melatonin timing |
| Mania/hypomania | “Don’t need sleep,” “so much energy,” “mind racing” | Decreased need for sleep (not insomnia); elevated mood; impulsivity | Pressured speech; elevated mood | Do NOT give sleep aids; psychiatry referral |
| Substance withdrawal | “Can’t sleep since I quit drinking” | Recent cessation of alcohol, benzos, opioids | May have tremor, anxiety, autonomic signs | Assess withdrawal severity; may need supervised detox |
Workup#
Most insomnia is diagnosed clinically. Labs only if medical cause suspected.
Consider based on presentation:
| Test | When to order |
|---|---|
| TSH | Symptoms of hyperthyroidism; unexplained insomnia |
| Ferritin | Suspected restless legs syndrome (goal >50-75) |
| BMP | If starting certain medications; suspected medical cause |
| Sleep study (polysomnography) | Suspected sleep apnea (STOP-BANG ≥3); treatment-refractory insomnia |
STOP-BANG score for sleep apnea:
- Snoring (loud)
- Tired (daytime sleepiness)
- Observed apneas
- Pressure (hypertension)
- BMI >35
- Age >50
- Neck circumference >40 cm (16")
- Gender male
- Score ≥3: intermediate-high risk → sleep study
When NOT to order sleep study:
- Clear primary insomnia without sleep apnea symptoms
- Insomnia clearly due to depression/anxiety
- Poor sleep hygiene as obvious cause
Initial management#
First-line for chronic insomnia: CBT-I (Cognitive Behavioral Therapy for Insomnia)
- More effective than medications long-term
- No side effects or dependence
- Effects persist after treatment ends
- Available in-person, online (Somryst FDA-cleared app), or self-guided
CBT-I components:
- Sleep restriction: limit time in bed to actual sleep time
- Stimulus control: bed only for sleep/sex; get up if awake >20 min
- Cognitive therapy: address catastrophic thoughts about sleep
- Sleep hygiene education
- Relaxation techniques
When to consider medications:
- CBT-I not available or patient declines
- Acute insomnia (<3 months) with clear precipitant
- Bridge while waiting for CBT-I to take effect
- Comorbid condition requiring pharmacotherapy
Medication principles:
- Use lowest effective dose
- Limit duration (2-4 weeks for most hypnotics)
- Plan for discontinuation from the start
- Avoid in elderly if possible (falls, cognitive impairment)
Management by diagnosis#
Chronic insomnia disorder (primary insomnia)#
Education:
- Insomnia is treatable
- CBT-I is more effective than pills long-term
- Sleep medications are not a long-term solution
- It takes time to reset sleep patterns
Treatment:
First-line: CBT-I
- Refer to sleep psychologist or behavioral sleep medicine
- Online options: Somryst (FDA-cleared), Sleepio, CBT-I Coach app
- Self-guided workbooks available
If medications needed:
| Drug | Dose | Contraindications | Monitoring | Cost | Notes |
|---|---|---|---|---|---|
| Melatonin | 0.5-5 mg 30-60 min before bed | None significant | None | $ | OTC; modest effect; best for circadian issues; start low |
| Trazodone | 25-100 mg at bedtime | MAOIs | None routine | $ | Off-label but widely used; sedating antidepressant; priapism rare |
| Doxepin (Silenor) | 3-6 mg at bedtime | MAOIs; urinary retention; glaucoma | None | $$$ | FDA-approved for sleep maintenance; low-dose antihistamine effect |
| Zolpidem | 5 mg (women), 5-10 mg (men) at bedtime | Severe hepatic impairment | Complex sleep behaviors | $ | Short-term only; FDA lowered dose for women; parasomnias risk |
| Eszopiclone | 1-3 mg at bedtime | Severe hepatic impairment | Complex sleep behaviors | $$ | Can be used longer-term per FDA; metallic taste |
| Suvorexant | 10-20 mg at bedtime | Narcolepsy; severe hepatic impairment | Daytime somnolence | $$$$ | Orexin antagonist; newer mechanism; expensive |
| Lemborexant | 5-10 mg at bedtime | Narcolepsy; severe hepatic impairment | Daytime somnolence | $$$$ | Orexin antagonist; may have less next-day impairment |
Avoid in most patients:
| Drug | Why to avoid |
|---|---|
| Diphenhydramine (Benadryl) | Anticholinergic; tolerance; next-day sedation; Beers list for elderly |
| Benzodiazepines (temazepam, etc.) | Dependence; falls; cognitive impairment; rebound insomnia |
| Zolpidem long-term | Dependence; complex sleep behaviors; falls |
Elderly considerations:
- CBT-I strongly preferred (no fall risk, no cognitive effects)
- If medication needed: low-dose trazodone or doxepin
- AVOID: benzodiazepines, zolpidem, diphenhydramine (Beers criteria)
- Start at lowest dose; “start low, go slow”
Pregnancy/breastfeeding:
- CBT-I is first-line and safe
- Avoid all hypnotics if possible
- If medication needed: diphenhydramine occasionally used (limited data)
- Melatonin: insufficient safety data; avoid
- Refer to MFM or psychiatry for complex cases
Tapering chronic hypnotic users:
- Gradual taper over weeks to months
- Reduce dose by 25% every 1-2 weeks
- Expect temporary worsening (rebound insomnia)
- Concurrent CBT-I dramatically improves success
- Switch to longer-acting agent if on short-acting (e.g., zolpidem → low-dose trazodone)
- For benzodiazepines: may need even slower taper (10% every 1-2 weeks)
Follow-up: 2-4 weeks to assess response; then monthly until stable.
Insomnia due to depression#
Education:
- Depression commonly causes sleep problems
- Treating depression often improves sleep
- May need both antidepressant and short-term sleep aid
Treatment:
- Treat underlying depression (see depression page)
- Sedating antidepressants can help sleep:
- Mirtazapine 7.5-15 mg at bedtime (also helps appetite)
- Trazodone 25-100 mg at bedtime (can add to SSRI)
- Avoid activating antidepressants at bedtime (fluoxetine, bupropion)
Follow-up: Per depression management; reassess sleep as depression improves.
Insomnia due to anxiety#
Education:
- Anxiety and insomnia feed each other
- Treating anxiety often improves sleep
- CBT-I addresses the anxiety-insomnia cycle
Treatment:
- Treat underlying anxiety (see anxiety page)
- CBT-I addresses racing thoughts and hyperarousal
- If medication needed: hydroxyzine 25-50 mg at bedtime (also treats anxiety)
- Avoid benzodiazepines for sleep (dependence, rebound)
Follow-up: Per anxiety management.
Obstructive sleep apnea#
Education:
- Sleep apnea causes fragmented sleep and daytime fatigue
- Untreated OSA increases cardiovascular risk
- CPAP is the gold standard treatment
- Weight loss can significantly improve or cure OSA
PCP role:
- Screen with STOP-BANG
- Refer for sleep study if score ≥3 or high clinical suspicion
- Refer to sleep medicine for CPAP initiation and management
- Support weight loss
- Manage comorbidities (HTN, diabetes)
Follow-up: Sleep medicine manages CPAP; PCP supports adherence and comorbidities.
Restless legs syndrome#
Education:
- RLS is a neurologic condition, not “just restlessness”
- Iron deficiency worsens RLS
- Medications can help significantly
Treatment:
| Drug | Dose | Contraindications | Monitoring | Cost | Notes |
|---|---|---|---|---|---|
| Iron supplementation | Ferrous sulfate 325 mg daily | Hemochromatosis | Ferritin (goal >50-75) | $ | First step if ferritin <75 |
| Gabapentin | 300-900 mg at bedtime | Renal impairment (adjust dose) | None | $ | First-line medication; also helps sleep |
| Pregabalin | 75-300 mg at bedtime | Renal impairment (adjust dose) | None | $$ | Alternative to gabapentin |
| Pramipexole | 0.125-0.5 mg 2-3 hours before bed | None significant | Augmentation | $ | Dopamine agonist; risk of augmentation with long-term use |
| Ropinirole | 0.25-4 mg 2-3 hours before bed | None significant | Augmentation | $ | Dopamine agonist; augmentation risk |
Augmentation: Worsening of RLS symptoms with dopamine agonists over time; switch to gabapentinoid if occurs.
Follow-up: 4-6 weeks after starting treatment; then as needed.
Circadian rhythm disorders#
Delayed sleep phase (night owl):
- Common in adolescents/young adults
- Can’t fall asleep until 2-3am; sleeps fine once asleep
- Treatment: morning bright light therapy; low-dose melatonin 0.5-3 mg 5-7 hours before desired bedtime
Advanced sleep phase (early bird):
- Common in elderly
- Falls asleep at 7-8pm; wakes at 3-4am
- Treatment: evening bright light therapy; avoid morning light
Follow-up: 4-6 weeks to assess response.
Follow-up#
Initial:
- 2-4 weeks after starting treatment
- Review sleep diary
- Assess response to CBT-I or medication
Ongoing:
- Monthly until stable
- Taper medications when possible
- Reassess for underlying conditions if not improving
Return precautions:
- Daytime sleepiness affecting safety (driving)
- Symptoms of sleep apnea (snoring, witnessed apneas)
- Worsening depression or anxiety
- Medication side effects (next-day sedation, complex sleep behaviors)
When to refer:
- Suspected sleep apnea → sleep medicine
- Refractory insomnia despite CBT-I and medication trials → sleep medicine
- Complex sleep disorders (narcolepsy, parasomnias) → sleep medicine
Patient instructions#
- Good sleep habits are the foundation of better sleep. Go to bed and wake up at the same time every day, even on weekends.
- Use your bed only for sleep and sex. If you can’t sleep after 20 minutes, get up and do something relaxing until you feel sleepy.
- Avoid screens (phone, TV, computer) for at least 30 minutes before bed. The light tells your brain to stay awake.
- Limit caffeine, especially after noon. Avoid alcohol before bed—it may help you fall asleep but disrupts sleep later.
- If you’re prescribed a sleep medication, use it only as directed and for the shortest time needed. These are not meant for long-term use.
- Call us if you have loud snoring, stop breathing at night, or feel very sleepy during the day—you may need a sleep study.
Smartphrase snippets#
.INSOMNIAEVAL
Chronic insomnia, [sleep-onset / sleep-maintenance / mixed]. Duration [X months/years]. Sleep diary reviewed. No symptoms concerning for sleep apnea (STOP-BANG [score]). Screen for depression/anxiety: [PHQ-9/GAD-7 scores]. Discussed CBT-I as first-line treatment. [Referral placed / online CBT-I resources provided]. Sleep hygiene counseling provided. Follow-up in 4 weeks.
.INSOMNIAMED
Chronic insomnia with inadequate response to sleep hygiene measures. Starting [trazodone 25 mg / melatonin 3 mg] at bedtime. Discussed that sleep medications are for short-term use and CBT-I is more effective long-term. Avoid driving or operating machinery if sedated. Follow-up in 2-4 weeks to assess response and plan taper.
.INSOMNIARLS
Restless legs syndrome based on clinical criteria: urge to move legs, worse at rest, worse at evening/night, relieved by movement. Ferritin [level] [ordered / low → starting iron supplementation]. Starting [gabapentin 300 mg at bedtime]. Discussed that symptoms may take several weeks to improve. Follow-up in 4-6 weeks.
Related pages#
- Chronic Insomnia (problem) — comprehensive ongoing management of chronic insomnia
- Obstructive Sleep Apnea (problem) — detailed OSA management including CPAP
- Depression — depression commonly causes insomnia
- Anxiety — anxiety commonly causes sleep-onset insomnia
- Fatigue — insomnia as cause of fatigue