Somnera
Getting help

What causes insomnia? The real reasons you can't sleep, and why it keeps going

Stress, caffeine, screens, pain, hormones, medication: almost anything can start insomnia. What keeps it going is usually something else. Here is how to tell the two apart.

12 min read

Share

It is 1:40 in the morning. You were tired at ten. You did everything right: no coffee after lunch, phone on the dresser, room dark. And here you are, wide awake, running through tomorrow's meetings and doing the math on how many hours are left if you fell asleep right now.

The natural question is why. What is causing this? People tend to look for one answer: a vitamin, a mattress, a hormone, a bad habit they can cut out. Sometimes there is one. More often there are several, and the one that started your insomnia is not the one keeping it going.

Insomnia is usually caused by a mix of three things: a natural tendency toward lighter, more alert sleep; a trigger such as stress, illness, pain or a schedule change; and the habits and worries that build up around poor sleep and keep it going after the trigger is gone. Sleep researchers call this the "3P" model, and it is the most useful way to think about your own nights.

This page is information, not a diagnosis. If something here sounds familiar, take it as a starting point for a conversation with your own clinician.

First, what counts as insomnia

Insomnia means difficulty falling asleep, staying asleep, or waking too early, despite having a fair chance to sleep, with effects on how you feel or function during the day. When it happens on three or more nights a week and has lasted three months or more, it is called chronic insomnia. The full definition of insomnia walks through each part.

The "despite having a fair chance to sleep" part matters. If you only get five hours because you work two jobs, that is sleep deprivation, not insomnia. The fix is time, not therapy. Insomnia is when the time is there and sleep still will not come.

The 3P model: why insomnia starts, and why it stays

In 1987, the psychologist Arthur Spielman described insomnia in three layers. Nearly four decades later, it is still how most sleep specialists explain it.

Predisposing factors: the background

These are the things that make some people more likely to develop insomnia than others. They include genetics, age, being female, and a temperament that worries or ruminates easily. Researchers also describe a state of "hyperarousal": in many people with insomnia, the body and brain run slightly hotter than average, by day and by night. A 2010 review in Sleep Medicine Reviews by Riemann and colleagues gathered evidence for this across heart rate, stress hormones, brain activity and brain imaging.

Predisposing factors do not cause insomnia on their own. They lower the threshold. You can carry all of them for years and sleep well.

Precipitating factors: the trigger

Something tips you over the threshold. A divorce, a death, a new baby, a job loss, a hospital stay, a move, a stretch of night shifts, a new medication. Most people can name the month their sleep went wrong.

For many people, sleep recovers once the trigger fades. That is short-term, or acute, insomnia. It is common, and it is normal.

Perpetuating factors: why it keeps going

This is the layer most people miss, and it is the most important one. After a few weeks of bad nights, people do sensible-seeming things to cope:

  • They go to bed earlier, or stay in bed later, to "catch up".
  • They nap.
  • They lie in bed trying harder to sleep.
  • They start to dread bedtime and to watch the clock.
  • They cancel plans and cut back on daytime activity because they are tired.

Each of these makes sense. Together they keep insomnia going. More time in bed spreads the same amount of sleep thinner, so the night becomes long stretches of wakefulness. Lying awake in bed, night after night, teaches the brain that the bed is a place for being awake and frustrated. And worrying about sleep is itself arousing, which is the opposite of what sleep needs.

This is why chronic insomnia so often outlasts the stress that started it. The original cause is gone. The habits and the worry are still there. Why you can't sleep when you're exhausted goes deeper into that loop.

Common causes and triggers

With the 3P model in mind, here are the triggers that come up most often. Several of them can also become perpetuating factors if they stick around.

1. Stress and life events

Stress is the most common trigger of all. The body's stress system and its sleep system work against each other: the same alertness that helps you handle a problem by day keeps you awake at night. The trigger does not have to be dramatic. A long run of ordinary pressure at work can do it.

2. Anxiety

Anxiety and insomnia feed each other. Anxious people sleep worse, and poor sleep makes anxiety harder to manage. A racing mind at bedtime is one of the most common complaints in insomnia. Insomnia and anxiety and why your mind races at night cover this in detail.

3. Depression

Insomnia is one of the core symptoms of depression, and it often shows up first. A 2011 meta-analysis by Baglioni and colleagues, pooling 21 long-term studies, found that people with insomnia but no depression had about twice the risk of developing depression later than people who slept well. The direction of cause is still debated, but the link is strong. If your mood has been low for two weeks or more, tell a doctor. Insomnia and depression explains what the research shows.

4. Caffeine

Caffeine blocks adenosine, the chemical that builds sleep pressure through the day. It also lasts longer than most people expect. In a 2013 study in the Journal of Clinical Sleep Medicine, Drake and colleagues gave healthy sleepers 400 mg of caffeine (roughly two to three cups of coffee) at bedtime, three hours before, or six hours before. Even the six-hour dose cut objectively measured sleep by more than an hour. The participants did not notice. The study was small and the dose was large, and people vary a lot in how they process caffeine. Still, if you are struggling, an afternoon coffee is worth a look.

5. Alcohol

Alcohol is a sedative, so it can help you fall asleep. The problem comes later. A 2013 review by Ebrahim and colleagues in Alcoholism: Clinical and Experimental Research found that alcohol consolidates the first half of the night but disrupts the second half, with more waking and less REM sleep. One or two drinks seem to have little effect; more than that does. If you often wake at 3 or 4 a.m. after an evening drink, that pattern may be part of the reason. Why you wake up at 3am covers the other common causes.

6. Evening light and screens

Light is the main signal your body clock uses to tell day from night, and bright light in the evening pushes that clock later. In a 2015 study in PNAS, Chang and colleagues had adults read either a light-emitting e-reader or a printed book for four hours before bed, five evenings in a row. On the e-reader nights they took longer to fall asleep, released less melatonin, had a later body clock and were less alert the next morning. The study used long, bright exposure, and a few minutes on a phone is not the same thing. But a bright screen at midnight is a signal that it is still daytime.

7. An irregular schedule

Going to bed and waking at very different times, especially sleeping in on weekends, keeps your body clock from settling. The effect is like mild jet lag every Monday. A fixed wake time, seven days a week, is one of the most powerful tools in CBT-I. How to reset your sleep schedule shows how to set one.

8. Shift work and jet lag

Working nights or rotating shifts asks you to sleep when your body clock says to be awake. Some people adapt. Many do not, and a separate condition called shift work disorder is recognized for this. Long-distance travel causes a short-term version of the same clash.

9. Pain and other medical conditions

Chronic pain, arthritis, acid reflux, asthma, heart failure, an overactive thyroid, needing to urinate at night, and many other conditions can break up sleep. Treating the condition often helps sleep, though insomnia can continue on its own once the patterns above have formed.

10. Sleep apnea

Obstructive sleep apnea, where the airway closes repeatedly during sleep, is usually thought of as a snoring problem. But it can also cause frequent waking and unrefreshing sleep that looks like insomnia, and the two often occur together. Loud snoring, gasping or pauses in breathing that someone else notices, morning headaches and heavy daytime sleepiness are reasons to ask for a sleep evaluation. Do I need a sleep study? explains when one is useful.

11. Restless legs syndrome

An uncomfortable urge to move your legs in the evening or at night, eased by moving and worse when you are still, can make it very hard to fall asleep. It is treatable and worth mentioning to a doctor.

12. Hormonal changes

Women report insomnia more often than men, and hormonal shifts are part of the reason. Sleep often changes around periods, in pregnancy, after birth and especially in perimenopause, when night sweats and hot flashes add to it. See perimenopause insomnia and postpartum insomnia.

13. Medications and substances

Some medicines can affect sleep in some people. Examples include certain antidepressants, corticosteroids such as prednisone, decongestants, stimulants used for ADHD, some blood pressure medicines, and thyroid medication. Nicotine is a stimulant too. Withdrawal from sleeping pills or alcohol can also cause rebound insomnia.

Do not stop or change any medication on your own. If you think a medicine is affecting your sleep, talk to your prescriber.

14. Getting older

Sleep naturally becomes lighter and more broken with age, and the body clock tends to shift earlier. Older adults also have more of the medical conditions and medicines above. But insomnia is not an inevitable part of aging, and CBT-I works in older adults too. CBT-I for older adults covers the trials.

The cause that keeps it going: your relationship with sleep

Go back to the 3P model. Most of the causes above are triggers. They explain why sleep went wrong. Once insomnia has lasted months, though, the perpetuating factors usually matter more than whatever started it.

That is frustrating if you have spent a long time hunting for the one cause. It is also good news. The perpetuating factors are habits and learned responses, and habits can change. You do not have to fix your genes, undo the stressful year, or find a hidden diagnosis to sleep better.

Signs that perpetuating factors are doing a lot of the work:

  • You feel sleepy on the sofa but wide awake the moment you get into bed.
  • You sleep better in a hotel or on someone else's couch.
  • You spend much more time in bed than you actually sleep.
  • You plan your day around how you slept.
  • Bedtime brings dread before you have even tried.

How to work out what is causing yours

You do not need a lab to start. Two weeks of a simple sleep diary will show you more than any single bad night:

  1. Write down when you went to bed, roughly how long it took to fall asleep, how long you were awake in the night, when you woke for good, and when you got up.
  2. Add the context: caffeine and alcohol and when, naps, exercise, stress, medication changes, and anything unusual.
  3. Look for patterns after two weeks. Do bad nights follow evening drinks? Late coffee? A late night on your phone? Sleeping in on Sunday?
  4. Work out your sleep efficiency: time asleep divided by time in bed. If it is well below 85%, you are likely spending too long in bed for the sleep you are getting, which is a classic perpetuating factor.

Bring that diary to a doctor if you see one. It turns a vague "I sleep badly" into something they can work with.

What helps, by cause

If there is a clear medical cause, such as apnea, restless legs, pain, reflux or a medication side effect, it needs its own care. Start with your doctor.

If there is an obvious trigger you can change, such as late caffeine, evening drinking or a wildly irregular schedule, change it and give it two weeks. Sleep hygiene tips cover the basics, and why sleep hygiene alone often isn't enough explains their limits.

If insomnia has lasted three months or more, whatever started it, the guidelines are clear. The American College of Physicians' 2016 guideline and the American Academy of Sleep Medicine's 2021 guideline both recommend cognitive behavioral therapy for insomnia (CBT-I) as the first-line treatment for chronic insomnia in adults, ahead of medication. CBT-I goes straight at the perpetuating factors: it rebuilds sleep drive with a set sleep window, re-teaches the bed as a place for sleep, and works on the worry that keeps you awake. It can be done with a therapist or through a structured CBT-I app. Results differ from person to person.

If anxiety or depression is part of the picture, treat both. CBT-I can be used alongside mental health care, and better sleep often helps mood.

When to see a doctor

See a doctor, or a sleep specialist, if:

  • poor sleep is affecting your work, mood, relationships or safety;
  • you snore loudly, gasp at night, or someone has seen you stop breathing;
  • you feel an urge to move your legs in the evening;
  • your mood has been low for two weeks or more, or you have thoughts of harming yourself;
  • you are drowsy while driving;
  • you think a medication may be affecting your sleep.

If you are in crisis, call or text 988 (Suicide & Crisis Lifeline, US).

The short version

Almost anything can start insomnia: stress, caffeine, alcohol, light, a new schedule, pain, hormones, medication. When it lasts, it is usually kept going by the way we respond to bad nights: more time in bed, trying harder, dreading bedtime. Rule out the medical causes, fix the obvious triggers, and if it has lasted three months or more, look at CBT-I, the treatment sleep doctors recommend first.

Sources

  • Spielman AJ, Caruso LS, Glovinsky PB. A behavioral perspective on insomnia treatment. Psychiatric Clinics of North America, 1987.
  • Riemann D, et al. The hyperarousal model of insomnia: a review of the concept and its evidence. Sleep Medicine Reviews, 2010.
  • Baglioni C, et al. Insomnia as a predictor of depression: a meta-analytic evaluation of longitudinal epidemiological studies. Journal of Affective Disorders, 2011.
  • Drake C, et al. Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed. Journal of Clinical Sleep Medicine, 2013.
  • Ebrahim IO, et al. Alcohol and sleep I: effects on normal sleep. Alcoholism: Clinical and Experimental Research, 2013.
  • Chang AM, et al. Evening use of light-emitting eReaders negatively affects sleep, circadian timing, and next-morning alertness. PNAS, 2015.
  • Qaseem A, et al. Management of chronic insomnia disorder in adults: a clinical practice guideline from the American College of Physicians. Annals of Internal Medicine, 2016.
  • Edinger JD, et al. Behavioral and psychological treatments for chronic insomnia disorder in adults: an American Academy of Sleep Medicine clinical practice guideline. Journal of Clinical Sleep Medicine, 2021.

Frequently asked questions

Stress is the most common trigger: work, money, illness, grief or a big life change. But for insomnia that has lasted months, the original trigger is often no longer the main cause. Habits and responses that build up around poor sleep, such as spending extra time in bed and trying hard to sleep, tend to keep it going.

Short-term insomnia after a stressful event often settles once the stress passes. Insomnia that has lasted three months or more is less likely to resolve on its own, because it is usually held in place by learned patterns. Those patterns are what cognitive behavioral therapy for insomnia (CBT-I) works on.

Yes. In a sleep study, a large dose of caffeine taken six hours before bed still cut objectively measured sleep by more than an hour, and the participants did not notice the difference. Sensitivity varies from person to person.

Alcohol can make you fall asleep faster, but research shows it disrupts the second half of the night, with more waking and less REM sleep. Overall it tends to make sleep worse, not better.

Some can. Certain antidepressants, steroids, decongestants, stimulants and some blood pressure medicines are known to affect sleep in some people. Do not stop or change any medication on your own. Talk to your prescriber.

See a doctor if poor sleep is affecting your days, if you snore loudly or someone has seen you stop breathing in your sleep, if you feel an urge to move your legs in the evening, if your mood is low, or if you are drowsy while driving.

More in Getting help