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).



