When ordinary sleep advice fails, the problem is often not effort. A calmer bedroom, less scrolling, and a consistent wind-down routine can help some people, but they do not touch the main obstacle if bedtime is being taken over by intrusive thoughts, compulsive rituals, or a body clock that is not ready for sleep until very late.
That distinction matters for OCD and sleep quality because the sleep problem is common, measurable, and often mislabeled. A Swedish population-based cohort study found that more than 42% of people with OCD experienced insomnia and that OCD carried roughly a sevenfold higher risk of an insomnia diagnosis compared with the general population.[1] In a clinical study of 61 OCD patients, the average time to fall asleep was 35.7 minutes, compared with 17.7 minutes in healthy controls.[2]
Those numbers describe something many people with OCD already know in their bodies: the night can become a second shift. The task is not simply to ask whether OCD causes insomnia. It is to ask which mechanism is doing the damage.

The Three Pathways Are Different Problems
OCD can interfere with sleep through at least three pathways. They can overlap, but they should not be collapsed into one vague explanation.
| What is happening at night | What it may look like | Primary treatment lane |
|---|---|---|
| Nighttime obsessions | The room gets quiet and intrusive thoughts, doubt, images, or feared possibilities become harder to disengage from. | OCD-focused treatment such as exposure and response prevention, with insomnia treatment added when needed. |
| Bedtime or overnight compulsions | Checking, ordering, counting, mental reviewing, reassurance-seeking, or repeating routines keeps restarting the night. | Response prevention around the sleep routine, usually within ERP. |
| Circadian delay | The person consistently cannot fall asleep until very late, then sleeps more naturally on a delayed schedule. | Circadian assessment and interventions such as morning bright light and carefully timed low-dose melatonin. |
This is why a single sleep tip can be perfectly reasonable and still miss the point. A breathing exercise may be useful if the main issue is physiological arousal. It is a weak answer if the person is trying not to neutralize a harm obsession. A strict bedtime may help ordinary insomnia. It can become another arena for failure if the person’s circadian phase is delayed and the body is not biologically prepared for sleep.
Pathway 1: Bedtime Gives Obsessions More Space
During the day, noise and obligations can partly mask OCD. At night, the room becomes quieter, the next task disappears, and the mind has fewer competing inputs. That does not mean the thoughts are more meaningful. It means the conditions are better for intrusive thoughts and repetitive negative thinking to occupy the foreground.
This pathway often feels like “my mind will not stop,” but the content matters. A person may replay whether they contaminated something, whether they harmed someone, whether a thought says something terrible about them, whether a memory proves guilt, or whether they need certainty before they are allowed to sleep. The problem is not just being awake with thoughts. The problem is being pulled into solving, checking internally, neutralizing, confessing, or trying to reach a clean mental state before sleep can begin.
A 2023 study of 639 participants found that repetitive negative thinking partially mediated the relationship between obsessive-compulsive symptoms and sleep disturbance, even after controlling for depression.[3] That finding is useful as a mechanism clue, not as settled proof for every clinical OCD patient. The sample was non-clinical and conducted in China, with many female university students, so it should not be stretched beyond what it can support.
Still, the pattern is clinically recognizable: the person is not refusing sleep; they are trying to get enough certainty, relief, or internal quiet to permit sleep. When that is the main pathway, generic advice to “clear your mind” can accidentally point the person toward another compulsion. The more useful question is whether bedtime has become a place where OCD demands resolution.
Clues that obsessions are driving the sleep problem
- The delay begins when the person gets quiet, not necessarily when they get into bed.
- The thoughts demand certainty, confession, memory review, reassurance, or mental correction.
- Trying harder to relax turns into monitoring whether the thought is gone.
- The person feels they cannot sleep until the thought feels solved, neutralized, or safe.
For this pathway, OCD-focused work is usually central. Exposure and response prevention does not aim to make the intrusive thought disappear before sleep. It teaches the person to change their response to the thought, including at the moment when the urge to solve it feels most urgent. If insomnia has become established on top of that, CBT-I may still be appropriate, and practical falling-asleep techniques can support the plan, but they should not become rituals for proving safety.
Pathway 2: Rituals Keep Reopening Bedtime
Compulsions are behaviorally different from lying awake. They add steps. They restart sequences. They move the person from bed to door to stove to sink to phone to memory review and back again. They can also appear after a normal nighttime awakening, when the person wakes at 3 a.m. and feels pulled to check, count, arrange, repeat a phrase, or mentally verify that nothing is wrong.
This pathway may prolong bedtime by 30 to 60 minutes or more when checking, counting, ordering, mental rituals, or reassurance-seeking become part of the sleep routine.[4] The person may technically be “going to bed” at a reasonable time while the actual sleep opportunity keeps being postponed by compulsive behavior.
A 2022 network analysis found weak direct correlations between sleep symptoms and OCD symptoms.[4] That can sound counterintuitive if OCD is plainly ruining the night. A careful reading is more helpful: the sleep effect may not show up as a simple one-to-one symptom correlation because it can run through control over obsessions, resistance to compulsions, mood, anxiety, and other intermediate factors. In real life, the lock-checking ritual may be the visible sleep barrier even if the statistical path is indirect.
The treatment implication is straightforward but not easy. If the sleep delay is created by rituals, the bedtime routine itself becomes a target for response prevention. The plan may involve deciding in advance what a reasonable safety check is, doing it once, and practicing not returning to the ritual even when doubt rises. For mental rituals, the response prevention target may be subtler: not reviewing, not replacing the thought, not testing whether the feared possibility still feels possible.
This is also where ordinary sleep hygiene can be misunderstood. A consistent routine is useful only if it does not become a longer script that OCD can police. A person may need a shorter, less negotiable routine, not a more elaborate one. General home remedies for sleeplessness belong underneath the OCD plan, not above it.
Clues that compulsions are the main sleep barrier
- The person begins the bedtime process early enough, but the process keeps expanding.
- Sleep is delayed by visible checking, arranging, washing, repeating, or reassurance-seeking.
- Mental rituals continue after the lights are off.
- Night wakings trigger another round of checking or neutralizing.
- The person feels temporarily relieved after the ritual, then doubt returns.

Pathway 3: The Sleep Phase Is Delayed
Delayed sleep phase disorder deserves more attention than it usually gets in discussions of OCD and sleep. It is not the same as staying up because the internet is more interesting than tomorrow. It is not simply insomnia with a later bedtime. In delayed sleep phase disorder, the person’s internal sleep-wake timing is shifted later: they cannot fall asleep until very late, then often sleep better and more naturally if allowed to wake later.
Clinical OCD samples have reported delayed sleep phase disorder rates from 17.6% to 42%, compared with 0.2% to 10% in the general population.[5][6] That range is wide, and it should be treated with caution. These studies drew from clinical samples, including tertiary care settings, which may overestimate rates in the broader OCD population. Several of the key OCD-DSPD studies also come from the mid-2000s to early 2010s, so updated large-sample work would be valuable.
Even with those caveats, the signal is too important to ignore. In the 2021 clinical study, OCD patients with delayed sleep phase disorder had more severe OCD symptoms and an earlier age of onset.[2] That does not prove delayed sleep phase causes more severe OCD, but it does show that the circadian subgroup is clinically meaningful.
The practical consequence is large. If a person’s body clock is shifted, pushing harder at 10:30 p.m. may produce hours of wakefulness, frustration, and more room for OCD symptoms to operate. The first question is not whether the person has enough discipline. It is whether the sleep window being demanded is biologically out of phase.
Clues that circadian delay should be assessed
- The person consistently cannot fall asleep until very late, even on calmer nights.
- Sleep feels easier and more restorative when the person is allowed to sleep late.
- The problem appears across many settings, not only during spikes in OCD content.
- Earlier bedtimes create long sleep latency rather than earlier sleep.
- Morning obligations produce chronic sleep restriction because the natural sleep period ends too late.
This is where treatment matching changes. ERP can reduce compulsions and obsessional responding, but it does not directly shift a delayed circadian rhythm. CBT-I can help with conditioned arousal and insomnia habits, but delayed sleep phase often requires circadian timing work. For many patients, that means appropriately timed morning bright light and low-dose melatonin timed several hours before the habitual bedtime, ideally with clinical guidance.[7]
The timing is not a decorative detail. Morning light is used to advance the body clock; light at the wrong time can push the clock later. Melatonin for circadian phase shifting is also a timing intervention, not just a stronger sleep aid. Readers who suspect this pathway should learn the basics of delayed sleep phase syndrome in adults, how circadian rhythm and light exposure interact, and why melatonin dose and timing need to match the sleep problem.
A case study described a patient with severe OCD and delayed sleep phase disorder whose treatment combined CBT with chronotherapy and was followed by improvement in both OCD symptoms and sleep delay.[7] A single case cannot tell us how often this will work, but it illustrates the central point: when circadian delay is part of the presentation, treating only the obsessional content may leave the timing disorder untouched.
Overlap Is Common, So Prioritization Matters
Many people will recognize more than one pathway. A delayed sleep phase can leave the person awake during the quietest part of the night, which gives obsessions more room. A contamination obsession can lead to washing rituals that extend bedtime. Repeated failures to sleep can then create ordinary conditioned insomnia on top of OCD.
The Segalàs study also found that depression and trait anxiety fully mediated the OCD-sleep relationship in its sample.[2] That finding should make clinicians and patients cautious about overly clean explanations. Poor sleep in OCD may travel through broader anxiety and mood processes, not only through symptom content. But that does not make the sleep problem vague. It means the plan should identify the most treatable bottleneck first.
A useful way to sort the overlap is to look at what most reliably lengthens the night.
| Primary bottleneck | What to prioritize first |
|---|---|
| Intrusive thoughts escalate when the person gets quiet | OCD-focused work, especially ERP skills for allowing uncertainty and resisting mental neutralizing. |
| Rituals extend bedtime or restart after awakenings | Response prevention built directly into the sleep routine and nighttime awakening plan. |
| The person sleeps better on a very late schedule and cannot shift earlier by trying harder | Assessment for delayed sleep phase and circadian treatment planning. |
| The person wakes often, fears the bed, or has learned to associate bed with wakefulness | CBT-I for insomnia patterns, while protecting against OCD rituals disguised as sleep strategies. |
This prioritization is not a diagnosis. It is a better starting conversation. A therapist, sleep clinician, or physician can help separate OCD rituals from insomnia behaviors, screen for circadian rhythm disorder, review medication and medical contributors, and decide whether ERP, CBT-I, circadian treatment, or a combined plan should come first.
A More Precise Question to Bring Into Care
If the main barrier is intrusive thought escalation, the sleep plan should not revolve around forcing the mind to feel clean before bed; it should prioritize OCD-focused work such as ERP. If bedtime is extended by rituals, the target is response prevention around the sleep routine itself. If the person consistently cannot fall asleep until very late and sleeps better on a delayed schedule, delayed sleep phase should be assessed and circadian treatment considered with clinical guidance.
The better question is not “Why can’t I sleep?” It is “Which OCD-sleep pathway is driving this, and which intervention matches it?”
References
- Obsessive-compulsive disorder and sleep: a population-based sibling-controlled cohort study, Swedish population-based cohort study.
- Sleep disturbances in obsessive-compulsive disorder: influence of depression symptoms and trait anxiety, BMC Psychiatry, 2021.
- The relationship between obsessive-compulsive symptoms and sleep quality: the mediating role of repetitive negative thinking, Frontiers in Psychology, 2023.
- Sleep and obsessive-compulsive symptoms: A network analysis, Journal of Obsessive-Compulsive and Related Disorders, 2022.
- Delayed sleep phase in severe obsessive-compulsive disorder: a systematic case-report survey, CNS Spectrums, 2008.
- Delayed sleep phase disorder in obsessive-compulsive disorder: a case-control study, World Psychiatry, 2007.
- Complicated relationship between circadian rhythm and obsessive-compulsive disorder: a case report, Journal of Clinical Sleep Medicine, 2011.






Comments
Join the discussion with an anonymous comment.