Insomnia

Which sleep medicines work, and how risky are they?

Sleep medicines likely help only modestly, with trade-offs that differ by drug, and guidelines put CBT-I first and the AASM suggests against trazodone and diphenhydramine.

Guidelines recommend cognitive behavioral therapy for insomnia (CBT-I) as the first treatment, with sleeping pills considered only after that falls short1. The pills themselves help modestly: Z-drugs shortened the time to fall asleep by about 22 minutes versus placebo, a gain the authors called of questionable clinical importance4. Z-drugs carry an FDA boxed warning for complex sleep behaviors5, and the AASM suggests against trazodone and diphenhydramine, a common over-the-counter sleep aid3.

What you can do

  • Ask first about CBT for insomnia: guidelines recommend it first, and 67 trials in people with chronic disease showed large gains in insomnia severity (Hedges g 0.98)1,2.
  • If a drug is considered, ask about its specific trade-offs: zolpidem and zopiclone caused more dropouts due to side effects than placebo in a 154-trial network analysis6.
  • Ask whether an over-the-counter sleep aid is wise at all: the AASM suggests against diphenhydramine, and a driving-simulator trial found it impaired one driving measure next morning3,16.

Be careful if

  • If you sleepwalk, sleep-drive or do things while not fully awake on eszopiclone, zaleplon or zolpidem, the FDA says to stop it and contact a clinician right away5.
  • Do not stop a long-term benzodiazepine suddenly; withdrawal can include seizures20. The FDA warns that mixing them with opioids, alcohol or illicit drugs risks overdose or death20.
  • In older adults, observational data link Z-drugs to falls and fractures, so discuss risks before long-term use7,8.
How it works What it does in your body, in plain words 4 min

The American College of Physicians recommends that all adults with chronic insomnia receive CBT-I as the initial treatment (a strong recommendation based on moderate-quality evidence), and that medicines be considered by shared decision-making, only for short-term use, when CBT-I alone has not worked (a weak recommendation based on low-quality evidence)1. A 2025 meta-analysis of 67 randomized trials in people with chronic disease found CBT-I improved insomnia severity by 0.98 standard deviations, with rare adverse effects2. Our page on natural management of insomnia covers what CBT-I involves, and sleep hygiene covers the basics.

The main medicine groups

The American Academy of Sleep Medicine (AASM) guideline reviewed individual drugs rather than classes3. It made weak suggestions in favor of using suvorexant, eszopiclone, zaleplon, zolpidem, triazolam, temazepam, ramelteon and doxepin for specific problems, and weak suggestions against trazodone, tiagabine, diphenhydramine, melatonin, tryptophan and valerian3. "Weak" reflects lower certainty, not a judgment that something is ineffective3.

Group AASM 2017 What stands out
Z-drugs (zolpidem, eszopiclone, zaleplon) Weak for Small gains; FDA boxed warning
Benzodiazepines (temazepam, triazolam) Weak for Effective short term; dependence
Orexin blockers (suvorexant) Weak for No excess falls in a meta-analysis
Low-dose doxepin Weak for Sleep staying power; short trials
Trazodone Weak against Little objective benefit
Diphenhydramine Weak against One driving measure impaired in a simulator

Z-drugs

Eszopiclone, zaleplon and zolpidem are "Z-drugs", sedative-hypnotics that work by slowing activity in the brain5. A meta-analysis of FDA-submitted trials found they cut polysomnographic sleep latency by 22 minutes (95% CI 11 to 33) compared with placebo4. In April 2019 the FDA required a boxed warning because rare but serious injuries and deaths had occurred with sleepwalking, sleep driving and other activities while not fully awake, which appeared more common with these three drugs than other prescription sleep medicines5. In older adults, short-term trials look favorable but longer observational studies link Z-drugs to falls and fractures7.

Benzodiazepines

In the network meta-analysis, benzodiazepines were more efficacious than placebo in acute treatment but caused more side effects and had poor tolerability6. They also carry dependence and withdrawal risks; see Benzodiazepines: Uses, Dependence and Risks and Coming Off Benzodiazepines Safely.

Orexin receptor antagonists (suvorexant, lemborexant, daridorexant)

These drugs reduce orexin-mediated arousal in the brain10. In the network meta-analysis, lemborexant was more efficacious than placebo in both acute and long-term treatment, while suvorexant and daridorexant were effective acutely but long-term data were missing or tolerability was poor6. A meta-analysis found no increase in falls or fractures with orexin antagonists, although data on lemborexant and daridorexant are limited9.

Low-dose doxepin

Doxepin, a histamine H1 receptor antagonist, has been tested in very small doses for sleep maintenance11,12. Trials in older adults and adults found improved time awake after sleep onset without significant next-day effects11,13.

Trazodone

Trazodone is widely used off-label for sleep, but a meta-analysis of seven placebo-controlled trials found no significant improvement in sleep efficiency, and the AASM suggests against its use for insomnia3,14.

Over-the-counter sleep aids

The AASM suggests against diphenhydramine, a common ingredient in over-the-counter sleep aids3. In a simulated-driving trial of healthy volunteers, diphenhydramine impaired one driving measure, speed deviation, the next morning16. In the network meta-analysis the related antihistamine doxylamine was more efficacious than placebo in acute treatment, though that analysis does not settle safety6. Our allergy medications compared page covers antihistamines more broadly. Ramelteon, which the AASM weakly supports for trouble falling asleep, showed no overall material benefit in the network analysis3,6. Melatonin and valerian are also not supported by the AASM for chronic insomnia; see melatonin safety, valerian and magnesium.

Special concerns for older adults

Older adults are the group most studied for harms. The 2023 AGS Beers Criteria are an explicit list of medicines typically best avoided by people 65 and older, but the published abstract does not name individual drugs, so this page does not quote it19. What the studies show is in the Deep section: falls and fractures with Z-drugs and benzodiazepines, and an observational link between strongly anticholinergic drug classes and later dementia7,8,18.

The evidence The studies, what they found, and how much to trust them 6 min · 20 sources

How big are the effects?

The FDA-data meta-analysis of Z-drugs pooled 13 randomized, double-blind, placebo-controlled studies with 4,378 participants4. Z-drugs produced small improvements in polysomnographic sleep latency (standardized mean difference with 95% CI from -0.57 to -0.16) and subjective sleep latency (-0.33, -0.62 to -0.04), amounting to 22 minutes (11 to 33 minutes) faster on polysomnography4. Secondary outcomes such as waking after sleep onset, total sleep time and sleep efficiency showed no significant effects, though few studies reported them4. The authors wrote that both the drug effect and the placebo response were small and of questionable clinical importance, but together they produced a reasonably large clinical response4.

The 2022 network meta-analysis in the Lancet is the broadest comparison: 154 double-blind randomized trials of 30 interventions in 44,089 participants6. For acute treatment, benzodiazepines, doxylamine, eszopiclone, lemborexant, seltorexant, zolpidem and zopiclone were more efficacious than placebo, with standardized mean differences from 0.36 to 0.83 (certainty high to moderate)6. Zopiclone and zolpidem caused more dropouts due to adverse events than placebo (OR 2.00, 1.28 to 3.13 and OR 1.79, 1.25 to 2.50), and benzodiazepines, eszopiclone, zolpidem and zopiclone caused more people to experience side effects than placebo, doxepin, seltorexant or zaleplon (OR range 1.27 to 2.78)6. For long-term treatment, eszopiclone (SMD 0.63, 0.36 to 0.90) and lemborexant (0.41, 0.04 to 0.78) beat placebo, both with very low certainty6. Melatonin, ramelteon and non-licensed drugs showed no overall material benefits6. The authors judged eszopiclone and lemborexant to have a favorable profile, with the caveats that eszopiclone might cause substantial adverse events and lemborexant safety data were inconclusive; doxepin, seltorexant and zaleplon were well tolerated but with scarce data; and benzodiazepines, daridorexant, suvorexant and trazodone can be effective acutely but have poor tolerability or no long-term information6. The study was funded by the UK National Institute for Health Research Oxford Health Biomedical Research Centre6.

Z-drug safety

The FDA's 2019 communication states that complex sleep behaviors have led to serious injuries and deaths, and advises that eszopiclone, zaleplon or zolpidem not be prescribed to people who previously had such behaviors after taking any of them5. It lists Lunesta, Sonata, Ambien, Ambien CR, Edluar, Intermezzo and Zolpimist as the products involved5.

A systematic review of 18 studies in adults 65 and older found Z-drugs similar to or better than placebo in short-term interventional studies, with good safety results, but in longer-term observational studies they significantly increased the risk of falls and fractures7. The authors recommended discontinuing Z-drugs in older adults mainly because of that risk, while acknowledging the evidence was low in quality and quantity7. A meta-analysis of 20 observational studies with 6,084,083 participants found a slight association between sedative-hypnotics and osteoporotic fractures: for Z-drugs and any fracture the case-crossover odds ratio was 1.41 (1.08 to 1.85), and for benzodiazepines and hip fractures 1.32 (1.05 to 1.66) in case-control studies8.

Orexin antagonists: efficacy and safety

A 2026 dose-response meta-analysis of 21 randomized placebo-controlled studies of daridorexant, lemborexant and suvorexant found dose-related improvements in total sleep time, waking after sleep onset, sleep efficiency and sleep-onset measures10. Curves plateaued near approved doses, effects were somewhat larger at the first assessment than after repeated use (though endpoint effects persisted), and sleep architecture was broadly preserved10. The authors did not support doses above the approved range10.

On safety, a meta-analysis of eight papers (46,636 subjects; three randomized trials and five case-control studies) found no increase in falls (OR 0.68, 0.31 to 1.50 in trials; adjusted OR 0.75, 0.00 to 1.50 in case-control studies) or fractures (1.01, 0.82 to 1.20)9. Note the wide intervals: they are compatible with both small benefit and meaningful harm, and the data on lemborexant and daridorexant are limited9.

Low-dose doxepin

Three placebo-controlled trials tested very low doses11,12,13. In a 12-week trial of 240 older adults with chronic primary insomnia (1 mg n=77, 3 mg n=82, placebo n=81), 3 mg improved waking after sleep onset (primary endpoint), total sleep time and sleep efficiency on night 1 (P<0.0001), and improvements were sustained at night 8511. There were no significant next-day residual effects and no reports of memory impairment, complex sleep behaviors, anticholinergic effects or weight gain11. A 4-week trial of 254 older adults found 6 mg improved subjective total sleep time and waking after sleep onset from week 1 through week 4, with no significant difference in time to fall asleep and no reports of anticholinergic effects or memory impairment12. A 35-day trial of 221 adults found 3 mg and 6 mg improved waking after sleep onset and total sleep time, with no rebound insomnia after stopping13. The AASM's weak suggestion applies to sleep maintenance rather than falling asleep, which fits these results3,12.

Trazodone

A meta-analysis of seven placebo-controlled trials (429 patients) found no significant improvement in sleep efficiency (SMD 0.09, -0.19 to 0.38) but only borderline better perceived sleep quality (SMD -0.41, -0.82 to -0.00; P = 0.05, I-squared 65%) and fewer awakenings (-0.51, -0.97 to -0.05), with no significant effect on sleep latency, total sleep time or waking after sleep onset, and good short-term tolerability14. A 2026 meta-analysis in people with depression (30 studies) found trazodone improved total sleep time and sleep efficiency, with dizziness, sedation, headache, nausea and somnolence reported; that population differs from people with insomnia alone15.

Over-the-counter antihistamines and anticholinergic burden

A randomized, double-blind, four-period crossover trial of 59 healthy volunteers dosed at about 11:30 pm and tested 6.5 hours later in a 100-km driving simulator16. Triazolam (the benchmark) significantly impaired all driving endpoints; diphenhydramine citrate 76 mg significantly impaired speed deviation compared with placebo and gabapentin (p<0.05)16. The trial involved healthy volunteers in a simulator, not people with insomnia on the road16.

Long-term anticholinergic exposure is a separate question. A UK case-control study of 40,770 people with dementia and 283,933 controls found an adjusted odds ratio of 1.11 (1.08 to 1.14) for any strongly anticholinergic drug, with risk rising for antidepressant, urological and antiparkinson classes but not distinctively for gastrointestinal drugs17. A second study (58,769 cases, 225,574 controls) found the odds ratio rose from 1.06 for the lowest exposure to 1.49 for more than 1,095 total standardized daily doses, with class-specific increases for anticholinergic antidepressants (1.29), antipsychotics (1.70), bladder antimuscarinics (1.65) and antiepileptics (1.39)18. Neither abstract singles out antihistamine sleep aids, both are observational, and the first study's authors note the drugs may have been used for very early symptoms of dementia17,18. These studies do not show that diphenhydramine or doxylamine cause dementia.

How sure are we?

Moderately sure that sleeping pills help modestly in the short term and that CBT-I should come first, because a network meta-analysis, a large FDA-data meta-analysis and two guidelines agree1,3,4,6. Less sure about long-term effects and about harms such as falls and dementia, which come from observational data, and least sure about trazodone and over-the-counter antihistamines, where evidence is limited and mixed14,16,17,18.

  1. Management of Chronic Insomnia Disorder in Adults: A Clinical Practice Guideline From the American College of Physicians. Qaseem A, Kansagara D, Forciea MA, Cooke M, Denberg TD, Clinical Guidelines Committee of the American College of Physicians. Annals of Internal Medicine, 2016. PubMed 27136449 (opens in a new tab)
  2. Cognitive Behavioral Therapy for Insomnia in People With Chronic Disease: A Systematic Review and Meta-Analysis. Scott AJ, Correa AB, Bisby MA, Chandra SS, Rahimi M, Christina S, Heriseanu AI, Dear BF. JAMA Internal Medicine, 2025. PubMed 40982264 (opens in a new tab)
  3. Clinical Practice Guideline for the Pharmacologic Treatment of Chronic Insomnia in Adults: An American Academy of Sleep Medicine Clinical Practice Guideline. Sateia MJ, Buysse DJ, Krystal AD, Neubauer DN, Heald JL. Journal of Clinical Sleep Medicine, 2017. PubMed 27998379 (opens in a new tab)
  4. Effectiveness of non-benzodiazepine hypnotics in treatment of adult insomnia: meta-analysis of data submitted to the Food and Drug Administration. Huedo-Medina TB, Kirsch I, Middlemass J, Klonizakis M, Siriwardena AN. BMJ, 2012. PubMed 23248080 (opens in a new tab)
  5. Certain Prescription Insomnia Medicines: New Boxed Warning - Due to Risk of Serious Injuries Caused by Sleepwalking, Sleep Driving and Engaging in Other Activities While Not Fully Awake. U.S. Food and Drug Administration. FDA Drug Safety Communication, 2019. Source (opens in a new tab)
  6. Comparative effects of pharmacological interventions for the acute and long-term management of insomnia disorder in adults: a systematic review and network meta-analysis. De Crescenzo F, D'Alò GL, Ostinelli EG, Ciabattini M, Di Franco V, Watanabe N, Kurtulmus A, Tomlinson A, Mitrova Z, Foti F, Del Giovane C, Quested DJ, Cowen PJ, Barbui C, Amato L, Efthimiou O, Cipriani A. Lancet, 2022. PubMed 35843245 (opens in a new tab)
  7. Efficacy and safety of Z-substances in the management of insomnia in older adults: a systematic review for the development of recommendations to reduce potentially inappropriate prescribing. Scharner V, Hasieber L, Sönnichsen A, Mann E. BMC Geriatrics, 2022. PubMed 35100976 (opens in a new tab)
  8. Sedative-hypnotics and osteoporotic fractures: A systematic review of observational studies with over six million individuals. Xu C, Leung JCN, Shi J, Lum DH, Lai FTT. Sleep Medicine Reviews, 2024. PubMed 37926010 (opens in a new tab)
  9. Association between the use of orexin receptor antagonists and falls or fractures: A meta-analysis. Pan G, Ni L, Yan H, Yao L. Journal of Psychiatric Research, 2024. PubMed 38944018 (opens in a new tab)
  10. Dose-response meta-analysis of dual orexin receptor antagonists on sleep parameters and implications for orexin-mediated arousal. Caiazza C, Palagini L, Toni C, Maffucci A, Sampogna G, Riemann D, Fiorillo A. Sleep Medicine, 2026. PubMed 42710466 (opens in a new tab)
  11. Efficacy and Safety of Doxepin 1 mg and 3 mg in a 12-week Sleep Laboratory and Outpatient Trial of Elderly Subjects with Chronic Primary Insomnia. Krystal AD, Durrence HH, Scharf M, Jochelson P, Rogowski R, Ludington E, Roth T. Sleep, 2010. PubMed 21102997 (opens in a new tab)
  12. Efficacy and safety of doxepin 6 mg in a four-week outpatient trial of elderly adults with chronic primary insomnia. Lankford A, Rogowski R, Essink B, Ludington E, Heith Durrence H, Roth T. Sleep Medicine, 2012. PubMed 22197474 (opens in a new tab)
  13. Efficacy and safety of doxepin 3 and 6 mg in a 35-day sleep laboratory trial in adults with chronic primary insomnia. Krystal AD, Lankford A, Durrence HH, Ludington E, Jochelson P, Rogowski R, Roth T. Sleep, 2011. PubMed 21966075 (opens in a new tab)
  14. Trazodone for the treatment of insomnia: a meta-analysis of randomized placebo-controlled trials. Yi XY, Ni SF, Ghadami MR, Meng HQ, Chen MY, Kuang L, Zhang YQ, Zhang L, Zhou XY. Sleep Medicine, 2018. PubMed 29680424 (opens in a new tab)
  15. Management of insomnia symptoms in depressed patients treated with agomelatine, mirtazapine and trazodone: A systematic review and meta-analysis. Zhang X, Chen Y, Deng R, Tao S, Zou M, Wang Q. Journal of Affective Disorders, 2026. PubMed 41679391 (opens in a new tab)
  16. Next-day residual effects of gabapentin, diphenhydramine, and triazolam on simulated driving performance in healthy volunteers: a phase 3, randomized, double-blind, placebo-controlled, crossover trial. Kay GG, Schwartz HI, Wingertzahn MA, Jayawardena S, Rosenberg RP. Human Psychopharmacology, 2016. PubMed 27018419 (opens in a new tab)
  17. Anticholinergic drugs and risk of dementia: case-control study. Richardson K, Fox C, Maidment I, Steel N, Loke YK, Arthur A, Myint PK, Grossi CM, Mattishent K, Bennett K, Campbell NL, Boustani M, Robinson L, Brayne C, Matthews FE, Savva GM. BMJ, 2018. PubMed 29695481 (opens in a new tab)
  18. Anticholinergic Drug Exposure and the Risk of Dementia: A Nested Case-Control Study. Coupland CAC, Hill T, Dening T, Morriss R, Moore M, Hippisley-Cox J. JAMA Internal Medicine, 2019. PubMed 31233095 (opens in a new tab)
  19. American Geriatrics Society 2023 updated AGS Beers Criteria® for potentially inappropriate medication use in older adults. By the 2023 American Geriatrics Society Beers Criteria® Update Expert Panel. Journal of the American Geriatrics Society, 2023. PubMed 37139824 (opens in a new tab)
  20. FDA requiring Boxed Warning updated to improve safe use of benzodiazepine drug class. U.S. Food and Drug Administration. FDA Drug Safety Communication, 2020. Source (opens in a new tab)

Every change to this page is tracked in version control. View edit history. If you have conflicting research, we want to hear about it.

Spotted something wrong or out of date? Suggest a change.

Weekly research digest

New topics and updated research, once a week when there's something new. How it works