· The SleepGrids Team · Psychology  · 9 min read

How to Sleep When You Have Anxiety: Techniques That Actually Work

Anxiety and insomnia feed each other in a feedback loop that gets worse the harder you try to sleep. Here's how to interrupt it — with techniques backed by sleep science.

Anxiety and insomnia feed each other in a feedback loop that gets worse the harder you try to sleep. Here's how to interrupt it — with techniques backed by sleep science.

Lying awake with an anxious mind is one of the most frustrating experiences there is — not because it’s physically painful, but because the harder you try to solve it, the worse it gets.

Anxiety and insomnia aren’t just co-occurring problems. They form a self-reinforcing loop: anxiety makes sleep harder, and the experience of not sleeping creates more anxiety. The conventional advice — “just relax,” “stop thinking about it,” “try to sleep” — actively makes it worse, because sleep is one of the few physiological processes that refuses to respond to effort.

Here’s what actually works.

Why Anxiety Makes Sleep So Hard (The Biology)

Sleep requires a specific neurological state: low sympathetic arousal, declining cortisol, reduced alertness, and a quieting of the prefrontal cortex — the planning and analytical part of the brain that anxiety keeps highly active.

Anxiety is essentially a false threat-detection response. The amygdala — the brain’s alarm system — activates the hypothalamic-pituitary-adrenal (HPA) axis, releasing cortisol and adrenaline, elevating heart rate, and sharpening attention. These responses evolved to help you survive real danger. They’re biologically incompatible with sleep onset.

The additional element unique to sleep anxiety is performance anxiety. Unlike most anxiety triggers, which are external, sleep anxiety is directed at a biological process you’re trying to make happen. The paradox is that conscious attention to sleep onset disrupts it. Sleep is an involuntary process — it happens when you stop directing it, not when you try harder. The act of monitoring whether you’re falling asleep activates the prefrontal cortex, the very neural region that needs to quiet down for sleep to occur.

Dr. Allison Harvey at the University of California, Berkeley, whose research focuses on cognitive models of insomnia, describes this as “the ironic process” — the conscious effort to suppress a thought or achieve a state produces the opposite result. The more you try not to think about not sleeping, the more prominently you think about it.

The Anxiety-Insomnia Feedback Loop

Understanding the loop is the first step to breaking it:

  1. Anxiety or stress makes falling asleep difficult
  2. Lying awake produces frustration and worry (“I won’t sleep again,” “I’ll be useless tomorrow”)
  3. These worries create additional physiological arousal — more cortisol, higher heart rate
  4. That arousal makes sleep even harder
  5. Repeat across nights, with the bed itself becoming a conditioned stimulus for wakefulness

This last point — the conditioned association between the bed and wakefulness — is a key mechanism in chronic insomnia. The bed and bedroom, which should trigger the relaxation response, begin triggering the opposite: alertness, dread, and hyperarousal. This is why spending a lot of time awake in bed (checking the phone, watching TV, lying anxiously) progressively makes the problem worse even when you think you’re resting.

Proven Techniques for Anxiety-Driven Insomnia

Stimulus Control Therapy

Stimulus control is consistently one of the most effective behavioural interventions for insomnia and is especially powerful for anxiety-driven sleep problems.

The rules are simple and uncomfortable:

  • Use the bed only for sleep and sex. No reading, no phone, no lying awake thinking.
  • Get out of bed if you can’t sleep within 15–20 minutes (estimate, don’t watch the clock). Go to another room, do something calm in dim light, and return only when you feel genuinely sleepy.
  • Maintain a consistent wake time every day, regardless of how you slept.

The goal is to retrain the learned association between the bed and wakefulness. It takes 1–2 weeks of consistent application — and it typically gets worse before it gets better — but the long-term effect on chronic insomnia is substantial. Research shows stimulus control therapy is among the most effective single components of Cognitive Behavioural Therapy for Insomnia (CBT-I).

Progressive Muscle Relaxation

Developed by physician Edmund Jacobson in the 1920s, progressive muscle relaxation (PMR) remains one of the most well-researched techniques for reducing physiological arousal before sleep.

The technique: systematically tense each muscle group in the body for 5–10 seconds, then release. Start at the feet and work upward — feet, calves, thighs, abdomen, hands, arms, shoulders, face. The deliberate contraction-release cycle reduces residual muscle tension and activates the parasympathetic nervous system, counteracting the cortisol-driven alertness of anxiety.

The practical benefit over mindfulness or breathing techniques for some people is that it gives the anxious mind something specific and concrete to focus on — which stops the rumination cycle by replacing it with a structured task.

Controlled Breathing

Any slow, exhale-dominant breathing pattern activates the vagus nerve and shifts the autonomic nervous system toward parasympathetic dominance — the “rest and digest” state that is the opposite of the fight-or-flight anxiety response.

The 4-7-8 pattern (inhale 4 counts, hold 7, exhale 8) and box breathing (4-4-4-4) are both effective. The key mechanism is the extended exhale, which drives heart rate variability changes that signal safety to the nervous system.

For sleep specifically: breathe through the nose where possible. Practice 4–8 cycles in bed, in the dark, before your mind starts to spiral. Don’t check the time before starting.

Cognitive Restructuring

Anxious sleepers tend to hold catastrophic beliefs about sleep: “If I don’t sleep 8 hours I’ll be completely useless tomorrow,” “I’ve ruined my health by not sleeping,” “I’ll never sleep well again.”

These beliefs are not accurate, and they dramatically amplify pre-sleep anxiety. A single bad night has real but limited effects on daytime functioning. The body has powerful compensatory mechanisms. Sleep catastrophising is a cognitive distortion, and treating it as such — examining the evidence, testing the belief against experience, practising more accurate self-talk — is a core component of CBT-I.

A practical reframe: change the goal from “I must fall asleep” to “I will rest my body.” You cannot force sleep, but you can choose to lie still, breathe slowly, and allow your body to do what it will. This removes the performance pressure and often allows sleep to arrive without being summoned. The broader relationship between overthinking and nighttime wakefulness is covered in our guide to stopping overthinking at night.

Building a Pre-Sleep Routine That Defuses Anxiety

Anxiety often spikes when the demands of the day stop and the mind has nothing else to direct its attention toward. A deliberate pre-sleep routine fills this transition period with calming, low-stimulation activity that reduces arousal before you ever get into bed.

Effective elements include:

  • A fixed wind-down period of 30–60 minutes with dim lighting and no work or news
  • Writing a to-do list for tomorrow before bed — research by Dr. Michael Scullin at Baylor University found that writing a concrete to-do list at bedtime significantly reduced sleep onset time by effectively “offloading” next-day concerns from working memory
  • Warm shower or bath 1–2 hours before bed — the subsequent drop in core temperature accelerates sleep onset
  • Consistent bedtime and wake time — predictability reduces anticipatory anxiety about sleep

What to avoid: news, social media, emotionally activating content, bright screens, and stimulating conversations in the hour before bed. These don’t just increase alertness — for anxious sleepers, they provide fresh material for the rumination cycle to work with.

What to Do When You Wake Up Anxious at 3am

Middle-of-the-night waking with anxiety is a different problem from difficulty falling asleep, but the same principles apply.

First: don’t check the time. Knowing exactly how many hours you have left before you need to wake up reliably amplifies anxiety. Cover the clock or turn your phone face down.

Second: don’t lie awake trying to force sleep for more than 15–20 minutes. Get up, go to a dim room, do something calm (reading a physical book, light stretching, slow breathing), and return to bed when you feel genuinely drowsy.

The counterintuitive move of getting out of bed is more effective than the intuitive move of lying there trying harder. It prevents the bed from becoming further associated with anxious wakefulness, and the additional stimulus control strengthens the bed-sleep association over time.

If anxious thoughts are the content of the waking, writing them down — literally transferring them from your head to paper — has a documented effect on reducing their psychological weight. You’re not solving the problems at 3am; you’re simply acknowledging them and deferring them to a more appropriate time.

The relationship between overall daytime stress and nighttime insomnia — including why the timing of stress matters — is explored in our guide to daytime stress and nighttime insomnia.

Frequently Asked Questions

How do you sleep when you have anxiety? The most effective approach is reducing physiological arousal rather than trying to force sleep. Evidence-based techniques include stimulus control therapy (bed only for sleep, leave if not sleeping within 15–20 minutes), progressive muscle relaxation, slow exhale-dominant breathing, and cognitive restructuring of catastrophic sleep beliefs. The central insight is that effort makes sleep anxiety worse — removing performance pressure is the first step.

What is the fastest way to fall asleep with anxiety? Controlled breathing is the fastest short-term tool. Any slow, exhale-dominant breathing (exhale longer than inhale) activates the parasympathetic nervous system and begins reducing physiological arousal within a few minutes. The 4-7-8 technique (inhale 4, hold 7, exhale 8) is widely used and effective. Progressive muscle relaxation takes slightly longer but provides deeper physical release.

Does anxiety cause insomnia, or does insomnia cause anxiety? Both. The relationship is bidirectional and self-reinforcing. Anxiety raises cortisol and activates the amygdala, making sleep onset harder. Poor sleep, in turn, reduces the prefrontal cortex’s ability to regulate the amygdala — making anxiety worse the following day. This cycle is why anxiety-driven insomnia often escalates without intervention.

Should I get out of bed if I can’t sleep? Yes — if you’ve been lying awake for 15–20 minutes without falling asleep. The stimulus control rationale is that staying in bed while awake reinforces the learned association between the bed and wakefulness. Getting up, moving to a dim room, and doing something calm breaks that association over time. Return to bed only when you feel genuinely sleepy.

Can tracking sleep help with anxiety-driven insomnia? Carefully — and with the right framing. Obsessively monitoring sleep metrics can amplify sleep anxiety. The productive use of sleep tracking for anxious sleepers is not to scrutinise every night but to look at weekly patterns: which nights were consistently better, and what preceded them. Tracking habits alongside sleep quality (stress level, exercise, alcohol, wind-down routine) in SleepGrids over several weeks often reveals patterns that direct attention toward the solvable variables rather than the uncontrollable ones.

Is CBT-I effective for anxiety-related insomnia? Yes — CBT-I (Cognitive Behavioural Therapy for Insomnia) is the gold-standard treatment for chronic insomnia including anxiety-driven types, consistently outperforming medication in long-term outcomes. It combines stimulus control, sleep restriction therapy, cognitive restructuring, and relaxation techniques. It’s available through therapists, online programmes, and apps.


Use SleepGrids to see which habits and routines are connected to your better nights — log your sleep and evening habits in 10 seconds a day, and let the visual pattern reveal what’s actually helping. Free on iPhone.

Back to Blog

Related Posts

View All Posts »