Anxiety and Insomnia: How to Break the Cycle When Your Brain Won’t Shut Off

It’s bedtime. You’re exhausted. Your body is begging for sleep. But the moment you lie down and close your eyes, your brain comes alive. Tomorrow’s to-do list. That email you should have sent differently. The thing you said three years ago that nobody else remembers. A low hum of dread about nothing specific. And the longer you lie there, the worse it gets — because now you’re anxious about not sleeping, which makes sleep even more impossible.

Anxiety and insomnia are so deeply intertwined that researchers debate which one comes first. The answer, in most cases, is both. Anxiety makes it hard to sleep, and poor sleep makes anxiety worse. It’s a bidirectional cycle that, once established, can be extraordinarily difficult to break — because every failed night of sleep adds fuel to the anxiety that caused it.

But here’s what most advice about anxiety and insomnia misses: in many cases, the anxiety driving the insomnia isn’t psychological in origin. It’s biological. A gut infection depleting serotonin. A cortisol curve that’s lost its rhythm. A nervous system locked in sympathetic overdrive from inflammation, nutrient depletion, or environmental toxins. When the anxiety has a biological root cause, talk therapy and meditation apps can only take you so far. The biology needs to be addressed.

The Anxiety-Insomnia Cycle: How It Locks In

The cycle typically establishes in three stages:

Stage 1: A trigger.

Something disrupts your sleep. Stress, illness, travel, a life event, a gut infection you don’t know about yet. You have a few bad nights. This is normal — acute insomnia affects nearly everyone at some point.

Stage 2: Anticipatory anxiety develops.

After enough bad nights, you start dreading bedtime. “Will I sleep tonight?” becomes a nightly question. This anticipatory anxiety activates the sympathetic nervous system, elevating cortisol and adrenaline at exactly the time they should be falling. The anxiety about not sleeping becomes itself a cause of not sleeping.

Stage 3: The cycle self-perpetuates.

Poor sleep increases daytime anxiety (through cortisol dysregulation, serotonin depletion, and impaired emotional processing from lost REM). The increased daytime anxiety raises the activation level you bring to bed. Higher bedtime activation means worse sleep. Worse sleep means more anxiety. The cycle is now running on its own momentum, independent of whatever originally triggered it.

What makes this cycle so resilient is that it operates on multiple levels simultaneously. The biological level — cortisol elevation, serotonin depletion, and vagal suppression — creates the physiological conditions for both anxiety and insomnia. The psychological level — catastrophic thoughts about sleep, conditioned fear of the bedroom, hyper-awareness of bodily sensations — amplifies the biological signal. And the behavioural level — compensatory napping, irregular schedules, phone use during awakenings — reinforces the pattern. Breaking the cycle requires intervention at all three levels, which is why single-approach treatments so often fall short.

Research from Oxford University found that rumination — repetitive negative thinking — during nighttime awakenings extended time-to-sleep-return by an average of 45 minutes compared to non-ruminators. The thoughts aren’t just annoying — they’re physiologically activating.

Is the Anxiety Driving the Insomnia — or Is Something Else Driving Both?

This is the question that changes everything. If anxiety is a personality trait or a response to life circumstances, the path forward involves stress management, CBT-I, and possibly medication. But if the anxiety is a symptom of an underlying biological issue, those approaches hit a ceiling.

Biological causes of anxiety that simultaneously cause insomnia include:

Gut infections. H. pylori and parasites deplete serotonin (90–95% of which is produced in the gut), B6, magnesium, and zinc — all of which regulate anxiety. They also drive chronic inflammation that activates the HPA axis, keeping cortisol elevated. The result: anxiety that feels physical (racing heart, chest tightness, sense of dread) rather than psychological (identifiable worries), and insomnia that resists standard treatments.

Cortisol dysregulation. A flattened or inverted cortisol curve — from chronic stress, infection, or HPA axis dysfunction — produces under-activation during the day (fatigue, brain fog) and over-activation at night (anxiety, restlessness). You’re anxious at bedtime not because of your thoughts but because your cortisol is elevated when it should be at its lowest.

Iron deficiency. Low ferritin impairs dopamine function, contributing to both anxiety and restless legs — a combination that makes bedtime miserable from two directions simultaneously.

Magnesium deficiency. Magnesium is a natural GABA-A receptor agonist. When it’s depleted, GABA function weakens, and both anxiety and sleep-onset difficulty worsen. Chronic stress and gut infections both deplete magnesium.

Mold exposure. Mycotoxins are neurotoxic and push the autonomic nervous system toward sympathetic dominance. The resulting “wired but tired” state mimics anxiety disorder but has an environmental cause.

The diagnostic clue: if anxiety arrived alongside insomnia (rather than preceding it by years), if it feels physical rather than mental, if it’s accompanied by digestive symptoms or fatigue, or if it appeared without an obvious life stressor — there’s a good chance the anxiety has a biological root cause that needs investigation.

What the Research Shows

Bidirectional relationship: Meta-analyses confirm that insomnia increases the risk of developing an anxiety disorder by 2–3x, and anxiety disorders increase insomnia risk by a similar magnitude. The relationship is genuinely bidirectional.

Gut-brain axis and anxiety: Research confirms that gut microbiome disruption alters serotonin, GABA, and dopamine availability, all of which regulate anxiety. Studies show that treating gut infections and restoring microbiome diversity reduces anxiety symptoms.

HRV and insomnia: People with insomnia-anxiety comorbidity consistently show lower HRV than those with either condition alone, indicating deeper autonomic dysfunction.

Magnesium and anxiety: Systematic reviews confirm that magnesium supplementation reduces anxiety symptoms, particularly in individuals with low baseline intake or documented deficiency.

Serotonin and sleep-anxiety comorbidity: Research in Neurogastroenterology & Motility confirms that gut infections — particularly H. pylori — impair serotonin production by damaging enterochromaffin cells. Since serotonin regulates both anxiety and melatonin production, a single gut infection can drive both conditions simultaneously through a shared biochemical pathway. This finding explains why treating the gut often resolves both the anxiety and the insomnia in patients who had been unsuccessfully treated for each condition separately. If you would like to see how we might be able to help you with this deeper, schedule a free consult here.

How to Break the Anxiety-Insomnia Cycle

Interrupt the Sympathetic Activation at Bedtime

  • Extended exhale breathing (4 seconds in, 6–8 seconds out) — directly activates the vagus nerve and shifts autonomic balance toward parasympathetic. This is the single most effective immediate intervention for bedtime anxiety.

  • Cold water on the face for 15–30 seconds — triggers the dive reflex, rapidly dropping heart rate and sympathetic tone

  • Progressive muscle relaxation — the tension-release cycle sends safety signals through the vagus nerve

Address the Biology Driving the Anxiety

  • Test gut health — comprehensive stool panel (PCR) and H. pylori breath test if digestive symptoms coexist with the anxiety

  • Test nutrients — ferritin, B12, RBC magnesium, zinc, B6, vitamin D

  • Supplement magnesium glycinate (300–400 mg) and L-theanine (200 mg) before bed — both reduce anxiety through different mechanisms without sedation or dependence

Break the Conditioned Response

  • If you’ve been awake for 15–20 minutes, get up. Go somewhere dim and do something boring. Return when drowsy. This prevents the bed from becoming associated with wakefulness.

  • Stop clock-watching. Turn the clock away. Calculating remaining hours amplifies anticipatory anxiety.

  • CBT-I (Cognitive Behavioural Therapy for Insomnia) is the gold standard for breaking the conditioned anxiety-insomnia loop and is effective even when biological factors are also at play.

This article is educational. Anxiety coexisting with insomnia warrants both psychological support and biological investigation.

When to Seek Professional Help

Seek help if:

  • Anxiety and insomnia have coexisted for more than 3 months

  • The anxiety feels physical (racing heart, chest tightness, sense of dread) rather than connected to specific worries

  • Anxiety appeared alongside insomnia without an obvious life stressor

  • Digestive symptoms, chronic fatigue, or nutrient deficiencies coexist with the anxiety-insomnia pattern

  • Standard anxiety treatments (therapy, medication) have helped but haven’t fully resolved the insomnia

If you would like to see how we might be able to help you with this deeper, schedule a free consult here.

Frequently Asked Questions

Can anxiety cause insomnia?

Yes. Anxiety activates the sympathetic nervous system, elevating cortisol and adrenaline at bedtime. This prevents the parasympathetic shift needed for sleep onset. Anticipatory anxiety about not sleeping compounds the effect, creating a self-reinforcing cycle.

Can insomnia cause anxiety?

Yes. Sleep deprivation impairs emotional regulation (through lost REM), elevates cortisol, depletes serotonin, and sensitises the amygdala. Each bad night makes the next day’s anxiety worse, which makes the next night’s sleep harder.

How do I stop racing thoughts at bedtime?

Extended exhale breathing (4 in, 6–8 out) is the most effective immediate technique — it directly activates the vagus nerve. L-theanine (200 mg) promotes alpha brain waves that quiet the seeking mind. Address the root cause: if thoughts race because cortisol is elevated or serotonin is depleted, those biological factors need investigation.

Can gut health cause anxiety and insomnia together?

Yes. The gut produces 90–95% of serotonin and communicates with the brain via the vagus nerve. Gut infections deplete serotonin, drive inflammation, and elevate cortisol — causing anxiety and insomnia simultaneously through shared biological pathways.

Is anxiety-driven insomnia treatable?

Yes. CBT-I is effective for breaking the conditioned cycle. When anxiety has biological root causes — gut infections, nutrient deficiencies, HPA axis dysfunction — addressing those causes resolves both the anxiety and the insomnia.

When to Work With a Sleep Consultant

When anxiety and insomnia are locked in a cycle, the question that breaks it open is: what’s driving the anxiety? If the answer is biological — a gut infection, a nutrient gap, a nervous system stuck in overdrive — then the solution lives in investigation, not just coping strategies.

Riley Jarvis at The Sleep Consultant works with clients to uncover the root biological causes behind chronic sleep issues and build personalised protocols that address every layer — not just the symptoms.

Book a consultation at TheSleepConsultant.com.

Share This Post
Facebook
Twitter
LinkedIn