How it worksFeaturesPricingBlogSymptomsSleep scienceFAQContact Download free
Home / Blog / What causes insomnia

What causes insomnia? Three layers, not one cause

The question has a short answer that is wrong (stress) and a long answer that is useful: insomnia usually has three causes at three different moments, and the third one is the one you can still change.

By Jan Kohlhaas, founder & developer of SleepTrace · 10 min read · Updated Nov 3, 2026 · General wellness information, not a medical diagnosis

The short answer

Sleep medicine sorts the causes into three layers: traits that make you prone (a more easily aroused nervous system, family history, being female), events that start a bad stretch (stress, illness, drugs, schedule changes), and habits that keep it going (lying awake in bed, worrying about sleep itself). Twin studies put heritability at about 40%, and women carry a risk ratio of 1.41 in a meta-analysis of 1,265,015 participants. The third layer matters most, because it is the one most open to change.

What is it called when you can't sleep? The word is insomnia: trouble falling asleep, staying asleep or sleeping well enough, together with some cost the next day. A review in Nature Reviews Disease Primers describes insomnia disorder as predominantly characterized by dissatisfaction with sleep duration or quality and difficulties initiating or maintaining sleep, along with substantial distress and impairments of daytime functioning. Anyone who types "what is it called when u can't sleep" gets that one-word answer, and the useful part is the distinction behind it: a few bad nights without a daytime cost are ordinary poor sleep, and the rest of this page is about what lies behind the ones that are more.

Morin CM, Drake CL, Harvey AG, et al. Insomnia disorder. Nat Rev Dis Primers 2015. PMID 27189779

Two different causes hide inside this question: what started the insomnia, and what keeps it going. Most pages only ever mention the first.

This page sorts causes by their role instead of listing fifteen triggers. It also says where the evidence is thin, which is more often than a typical list of causes admits.

What causes insomnia: three layers, not one culprit

Looking for a single insomnia cause is the first mistake, and a very human one. The framework sleep clinicians use is usually credited to Spielman and colleagues in 1987. It sorts causes into predisposing, precipitating and perpetuating factors. Their paper is a review of behavioral treatments, and it puts the weight on the third layer: perpetuating factors in chronic insomnia, and the way sleep itself can be conditioned, for better or worse.

Spielman AJ, Caruso LS, Glovinsky PB. A behavioral perspective on insomnia treatment. Psychiatr Clin North Am 1987. PMID 3332317

Think of it as a timeline. A trait makes you prone. An event starts a bad stretch. Then your own coping decides whether the stretch ends or hardens. Insomnia reasons that look contradictory on different websites often just sit at different points on that line.

Two of the three layers (own schematic of the 1987 framework)Starts a bad stretchKeeps it goingA stressful eventLying awake in bed for hoursIllness or painNapping to catch upA new medicationWorry about sleep itselfShift change or travelIrregular wake-up timeGrief or a breakupThe bed as a place of effort
Own schematic, not data. The third layer, who is prone to begin with, is described in the next section. Examples are typical ones named in the sleep literature, not a ranked or measured list. Framework: Spielman et al., 1987, PMID 3332317

What insomnia means, in plain words

Insomnia means a complaint about your sleep plus a cost during the day, although you had enough opportunity to sleep; that is the wording of the 2008 guideline of the American Academy of Sleep Medicine. That guideline also called insomnia chronic after a month, an older criterion: ICSD-3 and DSM-5 now use three months, and the full definition, the types and the criteria are on What is insomnia?

How many people that covers depends on who you count. A meta-analysis of 16 studies with 18,270 older adults, mostly in their late sixties to eighties, pooled a prevalence of 19.6% for insomnia disorder by DSM criteria, with wide variation between studies. In the general adult population the review cited further down puts the diagnosis at about 6%.

Schutte-Rodin S, Broch L, Buysse D, Dorsey C, Sateia M. Clinical guideline for the evaluation and management of chronic insomnia in adults. J Clin Sleep Med 2008. PMID 18853708

Endomba FT, Tchebegna PY, Chiabi E, Angong Wouna DL, Guillet C, Chauvet-Gélinier JC. Epidemiology of insomnia disorder in older persons according to the Diagnostic and Statistical Manual of Mental Disorders: a systematic review and meta-analysis. Eur Geriatr Med 2023. PMID 37725311

How to fix insomnia, and what the 2021 guideline ranks first

If your sleep problem fits the definition above, the question of how to fix insomnia has a ranked answer. The 2021 AASM guideline on behavioral and psychological treatments for chronic insomnia disorder in adults gives a strong recommendation to multicomponent cognitive behavioral therapy for insomnia. It makes conditional suggestions for multicomponent brief therapies and for stimulus control, sleep restriction therapy and relaxation therapy as single treatments. It also suggests that clinicians not use sleep hygiene as a single treatment.

That last line is worth a second look. If tidy-bedroom and no-caffeine tips are all you have tried, and nothing has changed, that is consistent with the guideline rather than evidence that you are doing it wrong. The next step is to ask a doctor or a sleep clinic about cognitive behavioral therapy for insomnia, which is the package the trials further down this page measured.

Edinger JD, Arnedt JT, Bertisch SM, Carney CE, Harrington JJ, Lichstein KL, et al. Behavioral and psychological treatments for chronic insomnia disorder in adults: an American Academy of Sleep Medicine clinical practice guideline. J Clin Sleep Med 2021. PMID 33164742

Who is prone: the first layer

The best-supported idea here is hyperarousal. A 2010 review pulled together autonomic, hormonal, immune, electrical and brain-imaging studies and concluded that people with chronic insomnia show raised arousal at night and by day. Their reading was that primary insomnia is a final common pathway: a genetic vulnerability, plus stressors, plus habits and thoughts that perpetuate it.

Riemann D, Spiegelhalder K, Feige B, Voderholzer U, Berger M, Perlis M, Nissen C. The hyperarousal model of insomnia: a review of the concept and its evidence. Sleep Med Rev 2010. PMID 19481481

There is a way to see this trait in a lab. Researchers gave 104 people from a population sample a questionnaire about how easily stress disturbs their sleep, then recorded their sleep on the first night in an unfamiliar laboratory. People who scored high slept less efficiently and took longer to fall asleep. They also stayed alert in daytime nap tests despite their bad nights, which fits the idea of a nervous system that does not wind down easily. The effect held after the authors accounted for current and past insomnia.

Drake C, Richardson G, Roehrs T, Scofield H, Roth T. Vulnerability to stress-related sleep disturbance and hyperarousal. Sleep 2004. PMID 15124724

If you are the person who sleeps badly in hotels and the night before an exam, that is probably you, and it says little about the rest of your life.

Is insomnia genetic?

Partly, and the numbers are modest enough to say plainly. A meta-analysis of twin studies, 12 papers in all, put heritability at about 40%, higher in women than in men. A genome-wide study of 1,331,010 people found 202 regions and 956 genes linked to insomnia complaints, yet together they explained only 2.6% of the variance. Families can share a tendency, but it is a tendency and not a rule.

Barclay NL, Kocevska D, Bramer WM, Van Someren EJW, Gehrman P. The heritability of insomnia: A meta-analysis of twin studies. Genes Brain Behav 2021. PMID 33222383

Jansen PR, Watanabe K, Stringer S, Skene N, Bryois J, Hammerschlag AR, de Leeuw CA, Benjamins JS, Muñoz-Manchado AB, Nagel M, Savage JE, Tiemeier H, White T, 23andMe Research Team, Tung JY, Hinds DA, Vacic V, Wang X, Sullivan PF, van der Sluis S, Polderman TJC, Smit AB, Hjerling-Leffler J, Van Someren EJW, Posthuma D. Genome-wide analysis of insomnia in 1,331,010 individuals identifies new risk loci and functional pathways. Nat Genet 2019. PMID 30804565

Why women report insomnia more often

Women report insomnia more often than men, and the gap is not small. A meta-analysis of 31 papers with 1,265,015 participants found a risk ratio of 1.41 (95% confidence interval 1.28 to 1.55). The female excess was larger in the big, well-made studies, grew with age and showed up in most regions, though it was lower in East Asia.

Zhang B, Wing YK. Sex differences in insomnia: a meta-analysis. Sleep 2006. PMID 16453985

Hormones are the usual first guess for the cause of insomnia in women, and they are plausible: pregnancy and the menopause transition both change sleep, as the articles on pregnant insomnia and insomnia in perimenopause describe. But the meta-analysis only measured the gap. It did not test why, so treat every confident one-line explanation with suspicion, including this one.

What starts a bad stretch: the second layer

This is where the familiar list lives. Insomnia from stress is the classic case: an exam, a difficult boss, a death in the family. For most people it fades when the stress does. The people for whom it does not are, in the language above, the ones with the first layer in place and a third layer about to form.

Substances are the next suspects, and the studies are decent. In a home-based trial a moderate dose of caffeine (400 mg) taken at bedtime, three hours before or six hours before habitual bedtime produced measurable sleep disturbance compared with placebo, on both self-report and a portable sleep monitor. A review of alcohol studies in healthy volunteers found that alcohol shortens the time to fall asleep and consolidates the first half of the night, then disrupts the second half. That pattern fits waking in the small hours after a few evening drinks, though the review does not study insomnia patients.

Drake C, Roehrs T, Shambroom J, Roth T. Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed. J Clin Sleep Med 2013. PMID 24235903

Ebrahim IO, Shapiro CM, Williams AJ, Fenwick PB. Alcohol and sleep I: effects on normal sleep. Alcohol Clin Exp Res 2013. PMID 23347102

Light belongs here too. In a laboratory comparison, people who read on a light-emitting tablet before bed took longer to fall asleep, made less melatonin, had a later body clock and felt less alert next morning than when they read a printed book.

Chang AM, Aeschbach D, Duffy JF, Czeisler CA. Evening use of light-emitting eReaders negatively affects sleep, circadian timing, and next-morning alertness. Proc Natl Acad Sci U S A 2015. PMID 25535358

Medical triggers are the part people most often miss: pain, reflux, breathing problems at night, restless legs and some prescription drugs. A separate page covers medications that can cause insomnia, because the evidence there deserves more than a bullet. Illness and medication are also the layer where a doctor can actually help you, so they are worth mentioning early.

What keeps it going: the third layer

Here the story turns from cause to habit. After a few bad nights people do what anyone would do. They go to bed earlier to make up for it, stay in bed longer, nap, watch the clock, cancel the morning run, and start to dread bedtime. Each choice is sensible on its own. Together they teach the brain that bed is a place where you try hard and fail.

Older classification systems had a name for the settled form of this, psychophysiological insomnia, and an even older umbrella term, primary insomnia. The third edition of the International Classification of Sleep Disorders revised how insomnia is categorized, so you will see these names mostly in older sources and patient pages. The idea behind them has not gone away: an arousal that began with a trigger has become attached to the bed, the clock and the thought of not sleeping.

Sateia MJ. International classification of sleep disorders-third edition: highlights and modifications. Chest 2014. PMID 25367475

This is the layer behavioral treatment goes after. The American College of Physicians recommends cognitive behavioral therapy for insomnia (CBT-I) as the first treatment for chronic insomnia disorder in adults, and the European guideline gives it the same first-line status. Neither guideline makes the first-line recommendation about pills.

Qaseem A, Kansagara D, Forciea MA, Cooke M, Denberg TD, Clinical Guidelines Committee of the American College of Physicians. Management of Chronic Insomnia Disorder in Adults: A Clinical Practice Guideline From the American College of Physicians. Ann Intern Med 2016. PMID 27136449

Riemann D, Baglioni C, Bassetti C, Bjorvatn B, Dolenc Groselj L, Ellis JG, Espie CA, Garcia-Borreguero D, Gjerstad M, Gonçalves M, Hertenstein E, Jansson-Fröjmark M, Jennum PJ, Leger D, Nissen C, Parrino L, Paunio T, Pevernagie D, Verbraecken J, Weeß HG, Wichniak A, Zavalko I, Arnardottir ES, Deleanu OC, Strazisar B, Zoetmulder M, Spiegelhalder K. European guideline for the diagnosis and treatment of insomnia. J Sleep Res 2017. PMID 28875581

One thing this page does not claim: none of this means insomnia is your fault. The habits in the third layer are what a reasonable person does after several bad nights, which is why they are so common and so persistent.

Which comes first, depression or insomnia?

Depression and insomnia travel together often enough that a doctor will ask about both. The direction is the interesting part, and it runs both ways.

The large US Epidemiologic Catchment Area survey asked 7,954 people about sleep and psychiatric symptoms at baseline and one year later. At the first interview 10.2% reported insomnia. Among people who still had insomnia at the second interview, the odds of new major depression were 39.8 times those of people without insomnia (95% confidence interval 19.8 to 80.0). Among those whose insomnia had resolved, the odds ratio was 1.6 (0.5 to 5.3), a result that did not differ clearly from no increase. The authors raised the possibility that early recognition and treatment of sleep problems could help prevent later psychiatric illness; they did not prove it.

Ford DE, Kamerow DB. Epidemiologic study of sleep disturbances and psychiatric disorders. An opportunity for prevention? JAMA 1989. PMID 2769898

A review of insomnia epidemiology reached the same direction from the other side: people with insomnia are more likely to have a major depressive episode, and persistent insomnia goes with the appearance of a new one.

Ohayon MM. Epidemiology of insomnia: what we know and what we still need to learn. Sleep Med Rev 2002. PMID 12531146

Can depression cause insomnia, or the other way around?

Both. Disrupted sleep is one of the listed symptoms of depression, and persistent insomnia is a strong marker of later depression risk, which is not the same as proof of cause. The practical consequence is simpler than the theory. If depression and insomnia show up together, treat the pair as one problem and see a doctor about both, instead of waiting for the sleep to fix the mood or the mood to fix the sleep.

If your low mood is heavy or you have thoughts of harming yourself, please contact a doctor, a crisis line or emergency services in your country now, whatever your sleep looks like. In the US, call or text 988. A sleep app cannot assess this. Our page on mental health resources lists ways to find help.

Symptoms of insomnia and causes: telling a bad week from a disorder

The complaint takes three forms: trouble falling asleep, waking in the night, and waking too early, with tiredness or poor functioning the next day. How common it is depends on the definition. A review of more than 50 population surveys found that about one third of the general population has at least one insomnia symptom, 9% to 15% when daytime consequences are counted, and about 6% meet the criteria for an insomnia diagnosis.

Ohayon MM. Epidemiology of insomnia: what we know and what we still need to learn. Sleep Med Rev 2002. PMID 12531146

A Beijing community study with trained psychiatrists interviewing 10,778 adults found the same ladder: 17.7% had subjective sleep problems, 10.7% had clinically assessed insomnia symptoms and 3.0% met the DSM-5 criteria for insomnia disorder. Trouble falling asleep was the most common form, as a symptom (8.1%) and as a disorder (2.6%). Among people with insomnia disorder, 31.3% had another mental disorder.

Shang L, Zhao Y, Cong A, Lv P, Ding H, Zhu X, et al. Prevalence, subtypes, and comorbidity of DSM-5 insomnia disorder among adults in Beijing, China: a large-scale cross-sectional study. BMC Public Health 2026. PMID 41639643

For causes, the ladder matters. A bad week around an exam is the second layer talking, and it fades with the stress. Weeks of lying awake, dread of bedtime and tired days are the signs that the third layer, the habits that keep insomnia going, has taken over, and that is when the numbers above start to apply to you.

How do you fix insomnia? What the trials measured

Fix is a strong word, and the best-tested answer is a reduction. A meta-analysis of 20 randomized trials with 1,162 adults with chronic insomnia compared face-to-face cognitive behavioral therapy for insomnia (CBT-I) with inactive comparators. Each programme combined at least three of cognitive therapy, stimulus control, sleep restriction, sleep hygiene and relaxation. At the end of treatment, time to fall asleep improved by 19.03 minutes (95% confidence interval 14.12 to 23.93), time awake after falling asleep by 26.00 minutes (15.48 to 36.52) and sleep efficiency by 9.91 percentage points. Total sleep time improved by only 7.61 minutes, a change whose interval included zero. No adverse outcomes were reported, and the changes seemed to be sustained. The review excluded insomnia that came with medical, sleep or psychiatric disorders.

Trauer JM, Qian MY, Doyle JS, Rajaratnam SM, Cunnington D. Cognitive Behavioral Therapy for Chronic Insomnia: A Systematic Review and Meta-analysis. Ann Intern Med 2015. PMID 26054060

The gain was therefore mostly in time spent awake, not in extra sleep. The European guideline recommends CBT-I as the first-line treatment for chronic insomnia in adults of any age, and adds that a drug can be offered if CBT-I is not sufficiently effective or not available, for the short term. Which route fits you is a decision with a doctor.

Riemann D, Baglioni C, Bassetti C, Bjorvatn B, Dolenc Groselj L, Ellis JG, et al. European guideline for the diagnosis and treatment of insomnia. J Sleep Res 2017. PMID 28875581

How can I fall asleep with insomnia tonight?

No trial tests a one-night trick. What the evidence supports is the multi-week package above, and its ingredients are stimulus control (getting out of bed when you have been awake for a long time and returning when sleepy), sleep restriction (limiting time in bed to roughly the time actually asleep, which can cause sleepiness and is usually guided by a clinician), relaxation and work on worries about sleep. Because the trials tested the package, they cannot say which ingredient does the work. If you are lying awake right now, the second-layer evidence above is the part you can still use: caffeine taken six hours before bed disturbed sleep in the 400 mg trial, and so did reading on a light-emitting tablet before bed.

What a night recording can and cannot say about your cause

A recording will not show a hormone, a worry or a trait. It will not tell you which layer you are in. What it can do is narrow the list in one useful way: it shows whether something physical is breaking your night.

Many people who believe they have insomnia also snore, cough or talk in their sleep, or have a partner who gets up at 2 a.m. A phone that records the night, such as SleepTrace (the app has to stay open and the phone should be plugged in), picks up snoring, talking and coughing, marks each event with its time on a timeline and keeps a short clip of it to play back (on the free plan, 3 clips a month; unlimited with Premium), and flags apparent breathing pauses with a timestamp, without a clip. A pause after a stretch of silence points toward another cause entirely, and the European guideline names suspected breathing disorders and limb movements as reasons to look beyond insomnia. It also names substantial sleep-state misperception, where someone sleeps more than they feel they do, as a reason for a sleep study.

Here is an invented example, to show the reading and not a measurement. Say you record seven nights. On five of them the timeline is quiet for an hour after you lie down, then you shift around audibly twice and the rest is calm. On two nights there are loud stretches of snoring and a few marked breathing pauses. The five quiet nights fit the third layer, a long time spent trying. The two loud ones are the reason to book a doctor visit about breathing. Neither reading is a diagnosis; both give you something concrete to say at the appointment, which beats saying you cannot sleep.

If you want to try it, how to record yourself sleeping explains the setup, and the page on the insomnia test shows how clinicians assess the complaint itself.

When to stop reading and see a doctor

Get it checked if the problem has lasted several weeks and spoils your days, if you drive while sleepy, if you snore loudly and wake choking or short of breath, if your legs will not stay still in the evening, or if you suspect a medication has changed your sleep. Do not stop a prescribed drug on your own because of anything on this page. Ask the person who prescribed it.

Frequently asked questions

There is no single most common cause, which is the point of the three-layer model. Stress, illness, a new medication or a schedule change usually start a bad stretch, but whether it becomes chronic depends on traits you brought with you and habits that develop afterwards. Insomnia from stress tends to fade when the stress does, unless the habits around it have taken over.

Sudden insomnia usually has a trigger you can find if you look: a stressful event, an illness, a new medication, more caffeine or alcohol, a change in work hours or travel across time zones. When nothing turns up and the problem lasts weeks, it is worth mentioning to a doctor, who can look for medical causes and other sleep disorders.

Partly. A meta-analysis of twin studies estimated heritability at about 40%, higher in women than in men. A genetic study of 1,331,010 people found 202 regions linked to insomnia complaints, but together they explained only 2.6% of the variance. The genetic signal is real and small.

A meta-analysis found a risk ratio of 1.41 for women versus men across 31 papers, and the excess was consistent across ages. The studies establish that the difference exists, not why. Hormonal changes in pregnancy and the menopause transition are plausible contributors, and so are differences in how stress and caring duties fall, but the meta-analysis did not test them.

Yes, and insomnia can also come first. In a large US community survey (7,954 people followed for one year), people with insomnia at both interviews had far higher odds of new major depression than people without insomnia (odds ratio 39.8). Insomnia that had resolved by the second interview carried much less risk (odds ratio 1.6). If low mood or hopelessness is part of your picture, tell a doctor.

They can disturb sleep, which is not quite the same as causing a lasting disorder. In a home-based trial, 400 mg of caffeine taken at bedtime, three hours before or six hours before habitual bedtime produced measurable sleep disturbance compared with placebo. A review of alcohol studies in healthy volunteers found that alcohol shortens the time to fall asleep and consolidates the first half of the night, then disrupts the second half. Both belong to the second layer, the things that start a bad stretch.

It is called insomnia when the trouble falling or staying asleep comes with distress or impairment during the day. A 2015 review describes insomnia disorder as dissatisfaction with sleep duration or quality plus difficulty initiating or maintaining sleep, with substantial distress and daytime impairment. A few bad nights without a daytime cost are ordinary poor sleep.

Start with the second layer, the triggers you can look at: caffeine in the afternoon or evening, evening alcohol, a light-emitting tablet before bed, a new medicine, or a stressful event around the time it began. Traits such as easily disturbed sleep and the habits that keep insomnia going can be noticed but not measured at home. Trouble that lasts several weeks, or comes with loud snoring or restless legs, is worth taking to a doctor.

The best-tested answer is cognitive behavioral therapy for insomnia. In a meta-analysis of 20 trials with 1,162 adults, it shortened the time to fall asleep by 19 minutes and the time awake in the night by 26 minutes, with little change in total sleep time. The European guideline makes it the first-line treatment for chronic insomnia; what else is right for you is a decision with a doctor.

No trial has tested a one-night trick. The evidence is for a multi-week package (stimulus control, sleep restriction, relaxation, work on worries) usually guided by a clinician. Tonight, the evidence you can use is on triggers: caffeine six hours before bed and reading on a light-emitting tablet before bed both disturbed sleep in trials.

SleepTrace is a wellness app, not a medical device. This article is general information, not medical advice. If your symptoms are frequent, severe or worrying, please talk to a doctor.


Insomnia has several layers, and the one you can still change is easier to find with data. SleepTrace records sound only and estimates your sleep phases, so you can see long wake periods and what was happening around them, like snoring or coughing. It does not treat insomnia; a doctor or a trained therapist does.

Hear your own night. SleepTrace turns a night of audio into your sleep phases, the sounds you made, and how it all trends. Works without a wearable, better with one. Your phone on the nightstand is enough to start. Get it for iPhone or Android →

Keep reading

Get SleepTraceiPhone & Android · free to start
Download free