Somnera
The middle of the night

Insomnia and depression: what the evidence says about the link

Insomnia predicts depression, and treating insomnia improves depressive symptoms. What the evidence shows - including the result that did not hold up.

4 min read

Last reviewed October 7, 2026

Two wave lines that rise and fall together, intertwined

Share

If you are having thoughts of suicide or of harming yourself, call or text 988 in the US to reach the Suicide & Crisis Lifeline, or go to your nearest emergency department. This article is not a substitute for that.

Insomnia and depression are closely linked, in both directions. Insomnia is one of the strongest predictors of later depression, and treating insomnia has been shown to improve depressive symptoms. But one thing often claimed - that treating insomnia prevents depression - did not hold up when it was tested directly.

Insomnia predicts depression

A meta-analysis of longitudinal studies, following people over time, found that those with insomnia had 2.60 times the odds of developing depression later (95% CI 1.98 to 3.42).

That is a strong and consistent association. It is worth being precise about what it shows: insomnia comes first and depression is more likely to follow. It does not prove that insomnia alone causes depression - the two share risk factors, and they feed each other once both are present.

It is also why persistent insomnia deserves to be taken seriously in its own right, rather than treated as a minor side effect of a busy life.

Treating insomnia improves depressive symptoms

Pooled across trials of digital CBT-I, treatment improved depressive symptoms alongside sleep, with a standardized mean difference of −0.42 (95% CI −0.56 to −0.28).

A large trial of digital CBT-I in 1,711 adults found that the improvement in insomnia accounted for between 45.5% and 84.0% of the program's effect on wellbeing and other outcomes - in other words, sleeping better was the route through which the rest improved. More on the digital CBT-I trials.

The result that did not hold up

It is a short step from those findings to "treating insomnia prevents depression." That step was tested.

A randomized trial gave people with insomnia an online CBT-I program and followed whether they went on to have a depressive episode. There were 9 episodes in the program group and 13 in the control group - a difference that was not statistically significant (p=0.32).

Take the free assessment to see:

  • ✓Your Insomnia Severity Index (ISI) score
  • ✓A personalized 6-week CBT-I plan, built by a sleep physician
  • ✓How your sleep improves, night by night
Start free assessment

So: improving depressive symptoms is supported by the evidence. Preventing a depressive episode is not. The two are routinely conflated, and the difference matters.

Which do you treat first?

If depression is severe, or there is any risk to your safety, that comes first, and it needs a clinician. CBT-I is not a treatment for depression, and some parts of it - sleep restriction in particular, which increases daytime sleepiness - are not appropriate during a severe depressive episode.

When both are present and depression is not severe, treating the insomnia alongside other care is often reasonable, and may help both. That is a decision to make with a clinician who knows your situation. How to raise insomnia with your doctor.

Early waking

Waking very early and being unable to get back to sleep is a pattern often associated with low mood. If that is your pattern, and especially if your mood has also changed, mention both to a clinician rather than treating it as a sleep problem only. Why you wake at 3am.

How this connects to anxiety

Insomnia has a similar two-way relationship with anxiety, and the order of operations there is slightly different. Insomnia and anxiety: which one do you treat first? The rest of this section covers what happens at night.

Somnera is a self-guided education program built on CBT-I, founded and written by Dr. Camilo Ruiz, DO, FACOI, FAASM. It is not a diagnosis, it is not a treatment for depression, and it does not replace care from your own clinician. The assessment is free and takes about two minutes.

Citations

  • Baglioni C, et al. Insomnia as a predictor of depression: a meta-analytic evaluation of longitudinal epidemiological studies. J Affect Disord. 2011;135(1–3):10–19. doi:10.1016/j.jad.2011.01.011
  • Lee S, et al. Digital cognitive behavioral therapy for insomnia on depression and anxiety: a systematic review and meta-analysis. npj Digit Med. 2023;6:52. doi:10.1038/s41746-023-00800-3
  • Espie CA, et al. Effect of digital cognitive behavioral therapy for insomnia on health, psychological well-being, and sleep-related quality of life: a randomized clinical trial. JAMA Psychiatry. 2019;76(1):21–30. doi:10.1001/jamapsychiatry.2018.2745
  • Christensen H, et al. Effectiveness of an online insomnia program (SHUTi) for prevention of depressive episodes (the GoodNight Study). Lancet Psychiatry. 2016;3(4):333–341. doi:10.1016/S2215-0366(15)00536-2
  • Kyle SD, et al. Sleep restriction therapy for insomnia is associated with reduced objective total sleep time, increased daytime somnolence, and objectively impaired vigilance. Sleep. 2014;37(2):229–237. doi:10.5665/sleep.3386

Frequently asked questions

Insomnia is a strong predictor of later depression. Across longitudinal studies, people with insomnia had about 2.6 times the odds of developing depression. That shows a strong association over time; it does not prove insomnia alone causes it.

Pooled trials of digital CBT-I found improvements in depressive symptoms alongside the improvement in sleep. That is a finding about CBT-I as a body of research, not a replacement for treatment of depression.

That has not been shown. A trial that tested whether an online insomnia program could prevent depressive episodes found 9 episodes in the program group against 13 in the control group, which was not a significant difference.

If depression is severe, or there is any risk to your safety, that comes first and needs a clinician. When both are present and the depression is not severe, treating insomnia alongside it is often reasonable - a clinician can help you decide.