Home / Mental health / Sleep
Mental health
Sleep and insomnia
Why sleep protects your mood, memory and heart, how to tell insomnia from sleep apnea, and why CBT-I comes before sleeping pills.

On this page 9
Good sleep protects your mood, your memory and your heart. Poor sleep makes almost every health problem, including depression, anxiety and pain, harder to handle.
Trouble sleeping is common, and more so with age. Most sleep problems can be treated.
Key points
- Long-lasting insomnia is treated first with CBT-I, a short talk therapy, not a sleeping pill.4,5 Strong evidence
- Most adults need 7 or more hours a night. People 65 and older need about 7 to 8.1
- About 1 in 10 people has chronic insomnia: trouble sleeping at least 3 nights a week for 3 months.2
- Sleep and mood affect each other. People with insomnia were about twice as likely to develop depression later.3
- Loud snoring with gasping, restless legs, or acting out dreams can signal a sleep disorder worth a checkup.6,7,8
Why sleep matters
While you sleep, your brain stores what you learned and your heart and blood vessels repair themselves.9 Too little sleep raises stress and the odds of getting sick. Over time it is linked to type 2 diabetes, heart disease, high blood pressure and stroke, and it hurts attention and memory.1 Losing 1 to 2 hours a night for several nights can affect you as much as staying up a full day or two.9
Drowsy driving is a safety problem too. In 2024, drowsy-driver crashes killed 644 people in the United States, and experts believe the true number is higher.10 If you nod off or drift across lane lines, pull over somewhere safe.
Sleep, mood and anxiety
Sleep and mental health work in both directions. Depression, anxiety and bipolar disorder are common causes of insomnia, and insomnia raises the risk of depression later.2,3 Poor sleep is also linked to suicide and risky behavior, and it makes emotions harder to manage.9
More: sleep, mood and anxiety.
Insomnia

Insomnia means trouble falling asleep, staying asleep or getting restful sleep, even with enough time and a good place to sleep. By day you may feel tired, cranky or unable to focus.2
Short-term insomnia lasts up to 3 months and often follows stress, a loss, an illness or a change in routine. About 15 to 20 in 100 people have it at any one time. Chronic insomnia lasts longer. Older adults and women are affected more often, and worry about sleep can keep insomnia going long after its first cause is gone.2
More: insomnia.
Other common sleep disorders
Some sleep problems need their own tests and treatment.1
| Condition | What you might notice | Learn more |
|---|---|---|
| Obstructive sleep apnea (the airway keeps closing during sleep) | Loud snoring, choking or gasping, pauses in breathing, daytime sleepiness, morning headaches, waking to urinate11 | Sleep apnea |
| Restless legs syndrome | A strong urge to move your legs, with crawling or aching feelings that ease when you move. Worse in the evening and at rest.7 | Restless legs syndrome |
| REM sleep behavior disorder | Acting out dreams while asleep, such as shouting, punching or kicking. Often goes unnoticed until someone gets hurt.8 | Lewy body dementia |
Many people with sleep apnea do not know it. Untreated, it raises the risk of stroke and heart attack.6 A sleep study, in a lab or with a home monitor, can check for it.11 Restless legs syndrome may be linked to low iron in the brain, so doctors often check iron levels.7 REM sleep behavior disorder is often tied to a brain condition such as Parkinson's disease or dementia with Lewy bodies, so tell a doctor if someone in your home acts out dreams.8
Sleep in later life

Sleep often gets lighter with age, but feeling tired most days is not something to accept.1 Insomnia is more common in later life, and pain, health conditions and medicines all play a part.2
More: sleep in later life. With dementia: sleep problems in dementia and sundowning.
What helps
The badges show how strong the research is (see how we rate evidence).

CBT for insomnia (CBT-I)
Strong evidenceA short, structured therapy that changes the habits and thoughts that keep insomnia going. It works in person, by video or online.2 The American College of Physicians and the 2025 VA/DoD guideline both strongly recommend it first.4,5 Start with CBT for insomnia and our five lessons.
Treating sleep apnea
Strong evidenceA CPAP machine blows gentle air through a mask to keep your airway open, and it is the main treatment.11 A dentist-made mouth device, surgery or an implanted airway device are other options.5,11 See Sleep apnea.
Healthy sleep habits
Limited researchA steady wake-up time, morning light, less caffeine and alcohol, and a dark, quiet bedroom help, but habits alone rarely fix chronic insomnia. The 2025 VA/DoD guideline advises against using them alone.5 How to do it: healthy sleep habits.
Sleep medicines
Moderate evidenceIf CBT-I alone does not help, the American College of Physicians says doctors may consider a short course of medicine after weighing benefits, harms and costs with you.4 All sleep medicines have side effects. See Sleep medicines: what to know.
Melatonin
Limited researchThere is not enough evidence to recommend melatonin for chronic insomnia, and labels are often wrong. In a 2023 study, 22 of 25 melatonin gummies did not contain the listed amount.13 Ask your doctor or pharmacist before using it.
Try it: The Night Sky Sleep Diary is a free, private diary with the CBT-I steps. Sign in to keep an encrypted copy. Have a smartwatch or ring? Bring its sleep data in.
Sleeping pills: know the risks

- In 2019, the FDA added its strongest warning, a boxed warning, to zolpidem (Ambien), eszopiclone (Lunesta) and zaleplon (Sonata). They can cause sleepwalking, sleep driving and other actions while not fully awake. The FDA found 66 cases of serious injury, including 20 deaths.14
- Experts advise older adults to avoid benzodiazepines and the drugs above, which can cause falls and confusion that last into the next day. They also advise avoiding diphenhydramine (in Benadryl and many "PM" pain relievers), which can cause confusion, constipation and trouble urinating.12
- The 2025 VA/DoD guideline suggests against benzodiazepines, diphenhydramine and trazodone for chronic insomnia.5
- Do not stop a sleep medicine on your own. Talk with your doctor or pharmacist before changing anything.12
Pages in this section
- Insomnia: why it lasts, and why CBT-I comes first
- Sleep medicines: what to know: types, risks, safer choices
- Sleep apnea: signs, home tests, CPAP
- Sleep in later life: normal changes, naps, bathroom trips
- Sleep, mood and anxiety: how they affect each other
- Restless legs syndrome: symptoms, iron, treatment
- Healthy sleep habits: tips checked against the research
CBT-I lessons: 1. Sleep diary, 2. Sleep window, 3. Bed and sleep, 4. Sleep thoughts, 5. Wind-down.
Explore sleep
Insomnia
Why one bad stretch of sleep can turn into months of insomnia, and why the short therapy CBT-I is the treatment experts try first.
Read →Sleep apnea
The signs of sleep apnea, how it strains your heart and memory, how home and lab tests work, and treatments from CPAP to Zepbound and Inspire.
Read →Sleep medicines
How Z-drugs, orexin blockers, melatonin and Benadryl work, how much they really help, and why their risks grow after 65.
Read →Sleep in later life
What is normal about sleep in older age, and what helps with naps, night bathroom trips, pain and dementia, without risky sleep aids.
Read →Sleep and mood
How sleep, depression and anxiety push each other up or down, why insomnia can raise depression risk, and how treating it can lift mood.
Read →Sleep habits
Sleep tips checked against the research: wake time, daylight, caffeine, alcohol, screens and bedroom, plus what habits alone cannot fix.
Read →Restless legs
What restless legs syndrome feels like, why doctors now check iron first and avoid dopamine drugs, and which treatments work best.
Read →When to get help
- You have trouble sleeping most nights for several weeks, and it affects your days.
- You snore loudly, gasp or choke at night, or someone sees you stop breathing.
- You feel very sleepy by day, or you nod off while driving or in other unsafe places.
- You act out dreams, or you or your bed partner have been hurt during sleep.
- An urge to move your legs keeps you from falling asleep.
Bring a two-week sleep diary: bedtimes, wake times, naps, caffeine, alcohol, exercise and medicines.1,2 Our sleep diary lesson shows how.
If poor sleep comes with low mood, hopelessness or thoughts of suicide, call or text 988 any time to reach the 988 Suicide & Crisis Lifeline. If someone is in danger right now, or if a person stops breathing or cannot be woken, call 911. For more ways to reach help, see Get help.
Sources (14) · how we checked this page
- Centers for Disease Control and Prevention. About sleep. CDC. CDC
- American Academy of Sleep Medicine. Insomnia. Sleep Education. Sleep Education
- Baglioni C, et al. Insomnia as a predictor of depression: a meta-analytic evaluation of longitudinal epidemiological studies. J Affect Disord, 2011. DOI
- Qaseem A, et al. Management of chronic insomnia disorder in adults: a clinical practice guideline from the American College of Physicians. Ann Intern Med, 2016. ACP Journals
- U.S. Department of Veterans Affairs and Department of Defense. VA/DoD clinical practice guideline for the management of chronic insomnia disorder and obstructive sleep apnea, provider summary, version 3.0. VA, 2025. VA
- National Heart, Lung, and Blood Institute. Sleep apnea. NIH. NHLBI
- National Institute of Neurological Disorders and Stroke. Restless legs syndrome. NIH. NINDS
- American Academy of Sleep Medicine. New guideline provides treatment recommendations for people who act out their dreams while asleep. AASM, 2023. AASM
- National Heart, Lung, and Blood Institute. Sleep deprivation and deficiency: how sleep affects your health. NIH. NHLBI
- National Highway Traffic Safety Administration. Drowsy driving. NHTSA. NHTSA
- American Academy of Sleep Medicine. Obstructive sleep apnea. Sleep Education. Sleep Education
- American Geriatrics Society, Health in Aging Foundation. Ten medications older adults should avoid or use with caution. HealthInAging.org. HealthInAging
- National Center for Complementary and Integrative Health. Melatonin: what you need to know. NIH. NCCIH
- U.S. Food and Drug Administration. FDA adds Boxed Warning for risk of serious injuries caused by sleepwalking with certain prescription insomnia medicines. FDA, 2019. FDA
Education only. This page is general information written from the sources listed. It is not medical, legal or financial advice and does not replace a doctor, therapist or lawyer who knows your situation. How we write and check pages.