Obsessive compulsive disorder - OCD treatment and therapy from NOCD

OCD and Sleep: Strategies for managing nighttime symptoms

By Yusra Shah

Feb 19, 20258 minute read

Reviewed byPatrick McGrath, PhD

If you’re living with OCD and have trouble sleeping, you’re not alone—research shows that over 42% of people with OCD experience insomnia and sleep disturbances. Learn how OCD and sleep problems are connected, why compulsions and intrusive thoughts disrupt rest, and how ERP therapy can help you break the cycle.

If you have OCD, lying down at night to go to sleep can feel anything but restful. Instead of winding down, your mind might ramp up, filling the quiet with intrusive thoughts, doubts, or the urge to complete rituals before you can fall asleep. Maybe you find yourself stuck in mental loops, overanalyzing worries, or waking up in the middle of the night feeling the need to check, review, or seek reassurance.

This isn’t just a minor inconvenience—studies show that people with OCD have nearly seven times the likelihood of receiving an insomnia diagnosis or being prescribed medication for sleep issues compared to the general population. When OCD interferes with sleep, it can quickly become a cycle—exhaustion makes symptoms feel worse, and worsening symptoms make sleeping even harder. But understanding why this happens can be the first step toward breaking the pattern.

How does OCD affect sleep?

When it comes to OCD and sleep problems, there are some unique challenges. Lying in bed with nothing to distract you might make intrusive thoughts feel louder, making it harder to relax. “Living with these obsessions all day, and especially before bed, may not exactly put you in a restful, relaxed place to drift off to dreamland,” shares Dr. Patrick McGrath, Chief Clinical Officer at NOCD.

Some people with OCD experience nighttime rituals, feeling the need to check, arrange, or redo certain actions until they feel “just right.” Others struggle with rumination—getting caught up in analyzing past events or worrying about the future, unable to quiet their thoughts enough to fall asleep.

For some, OCD can also cause frequent waking throughout the night or the urge to perform compulsions as soon as they wake up, disrupting the natural sleep cycle. Sleep loss itself can also heighten OCD symptoms. Lack of sleep can lead to more difficulties in focusing and making decisions, which can make OCD feel even more overwhelming.

OCD and insomnia

If you live with OCD and are wondering if you are experiencing insomnia, you’re not alone. It is important to note that insomnia isn’t just about having trouble falling asleep—it also includes difficulty staying asleep, waking up too early, or not feeling rested even after sleeping. For many people with OCD, these sleep disruptions stem from compulsions that make bedtime longer and more complicated than it needs to be.

Can OCD cause insomnia?

OCD and insomnia often go hand in hand—research shows that over 42% of people with OCD experience insomnia. This can be due to specific obsessions and compulsions, or co-occurring conditions that interfere with restful sleep.

“A lot of times people who have OCD also have another condition such as depression or anxiety, and these conditions can contribute to trouble sleeping,” explains Dr. McGrath. The combination of multiple conditions—or even certain aspects of one—can impact a person’s ability to get the proper type of rest. So even if OCD itself isn’t directly causing insomnia, co-occurring conditions can play a major role in sleep struggles, and the lack of sleep can, in turn, worsen OCD symptoms.

Community discussions

If OCD is the direct cause of your insomnia, here are some of the things that might be contributing:

  • Ritualizing before bed: Feeling the need to check things repeatedly (like locks, alarms, or appliances), say certain prayers, or complete actions in a specific order before sleep can delay rest.
  • Mentally reviewing the day: Some people with OCD feel compelled to replay conversations or events, ensuring they didn’t say or do anything “wrong.”
  • Rumination and ‘what if’ thinking: Unanswered questions or uncertainties can keep the mind stuck in a loop, making it difficult to drift off.
  • Waking up and needing to complete a compulsion: Some people wake in the middle of the night feeling like they need to check or redo something before they can go back to sleep.

Not getting enough sleep can make intrusive thoughts feel stronger and harder to dismiss, creating a cycle that feels impossible to break. But while OCD and sleep issues can be frustrating and overwhelming, they don’t have to be permanent. With the right strategies, you can work toward better rest while managing OCD in a way that doesn’t reinforce compulsions.

Tips and tricks for sleeping with OCD

The key to improving your sleep is to tackle OCD-related disruptions head-on while building healthy sleep habits. Here are some effective strategies recommended by experts.

Addressing OCD and sleep problems

How to stop ruminating at night

When you’re finally in bed with no distractions, it can feel like the perfect time for your brain to go into overdrive. Maybe you’re replaying conversations from the day, analyzing things you said, or trying to solve problems that don’t have clear answers.

“To stop ruminating, you have to make a choice that no matter what intrusive thought, image, or urge you have, you will not engage with it,” says Stacy Quick, LPC. “Think of it as if you were completing a school task and the teacher said ‘time’s up,’ meaning you’re required to put your pencil down.”

Instead of engaging with these thoughts, remind yourself that now is not the time for problem-solving. Practicing mindfulness, grounding exercises, or simply redirecting your attention to your breathing can help pull you out of a ruminative spiral.

How to stop intrusive thoughts at night

It’s impossible to stop intrusive thoughts altogether, but you can change the way you respond to them. If distressing thoughts are keeping you awake, trying to push them away or replace them with a “good” thought will only make them stick around longer.

How to get treatment for OCD that affects your sleep

If OCD symptoms are significantly disrupting your sleep, the best long-term solution is seeking treatment. Exposure and response prevention (ERP) therapy is the most clinically effective treatment for all types of OCD.

ERP involves working closely with a specialized therapist to gradually face intrusive thoughts and fears, starting with smaller ones and building up to the ones that are more challenging. The goal is to learn how to sit with these fears without engaging in compulsions—giving you the tools to tolerate discomfort and ultimately break the OCD cycle.

“Finding a therapist who specializes in OCD and is trained in ERP is not only imperative to help you manage OCD, but it can be an effective way for you to improve your sleep. They can help you develop a personalized treatment plan that will address the unique factors that are contributing to your lack of sleep or restless sleep,” shares Quick. 

Find the right OCD therapist for you

All our therapists are licensed and trained in exposure and response prevention therapy (ERP), the gold standard treatment for OCD.

Other strategies to help you get better sleep

Create a healthy headspace for sleep

Your bed should be a place for rest, but it’s easy for it to become a space for everything else—scrolling through social media, checking notifications, or even doing last-minute online shopping. While these activities might seem like harmless distractions, they can actually make it harder to sleep, especially if you have OCD.

Try to limit screen time before bed to help your brain recognize that your bed is meant for rest. Keeping your sleep environment dedicated to relaxation can make it easier to wind down and actually fall asleep when you need to.

Don’t give in to sleep-stealing compulsions

It can be tempting to just complete “one last check” or go through a mental review to get reassurance before falling asleep, but this only strengthens the OCD cycle. Try not to give in to compulsions during your designated sleep time, because it can become self-defeating, says Dr. McGrath. Practicing ERP-inspired strategies at night—whether that means skipping a checking ritual or resisting the urge to ruminate—can help retrain your brain to tolerate uncertainty and discomfort, making sleep easier in the long run.

Sleep hygiene

Good sleep hygiene can make a big difference in your ability to fall and stay asleep. This includes:

  • Keeping a consistent bedtime and wake time
  • Avoiding caffeine or heavy meals too close to bedtime
  • Reducing screen time before bed
  • Making sure your sleep environment is cool, dark, and quiet

Small changes to your routine can make it easier for your body and mind to transition into sleep mode.

Supplements

While no supplement can “cure” OCD, some people find that certain vitamins, like magnesium or melatonin, help with sleep. Supplements won’t replace treatment, but they can be part of a bigger plan for improving sleep quality. “It’s important to check with your doctor to ensure that supplements won’t interfere with any medications you’re taking or treatments you’re using,” says Dr. McGrath, “however, many people with OCD may find melatonin and valerian root beneficial for sleeplessness.” 

Taking it one step at a time

Improving sleep with OCD doesn’t happen overnight. It takes patience and consistency. If you’ve been struggling with sleep for a long time, it can feel overwhelming to make changes all at once. Instead of trying to fix everything immediately, start small—whether that’s skipping one compulsion before bed, testing out a meditation app, or adjusting your sleep routine.

Bottom line

By understanding how OCD and sleep problems affect you, learning to manage nighttime compulsions, and building better sleep habits, you can take meaningful steps toward getting the rest you need. Whether it’s making small adjustments to your bedtime routine, practicing mindfulness, or seeking treatment through exposure and response prevention (ERP) therapy, change is possible.

You don’t have to let OCD and a lack of sleep control your nights—taking even one step toward better sleep is a step toward regaining control.

Key Takeaways

  • OCD and sleep problems are closely linked—over 42% of people with OCD experience insomnia or other sleep disturbances.
  • Compulsions can make it harder to fall asleep, stay asleep, and feel rested, creating a frustrating cycle.
  • Co-occurring conditions like anxiety and depression can also contribute to OCD trouble sleeping, making it even more challenging to get proper rest.
  • Exposure and response prevention (ERP) therapy is the most effective treatment for OCD and can help reduce nighttime compulsions that interfere with sleep.

We specialize in treating OCD

Reach out to us. We're here to help.