The Sleep Detective
The Sleep Detective
Home
About Me
Work With Me
Complete Sleep Solution programOptimal Sleep, Health & Longevity program
Success Stories
Blog
Podcast
The Sleep Detective Podcast
Free trainings
Blog/7 min read

Insomnia, Anxiety and Depression: The Real Root Cause

By Martha Lewis, FDN-P | Functional Sleep Detective7/22/2026
Insomnia, Anxiety and Depression: The Real Root Cause

About Martha


Key Takeaways

  • Insomnia, anxiety, and depression frequently share the same root causes — chronic stress and cortisol dysregulation, gut pathogens, depleted neurotransmitters, hormone imbalances, and toxin burden — rather than being separate mental health and sleep problems that just happen to overlap.
  • 90% of the body's neurotransmitters, including serotonin, GABA, and dopamine, are produced by bacteria in the gut, so an infected or imbalanced gut can directly drain the exact chemicals your body needs to feel calm and fall asleep.
  • Functional lab testing across gut health, hormones, neurotransmitters, and toxins identifies which of these systems is actually driving your symptoms, so you can treat the real cause instead of managing anxiety, depression, and insomnia as three separate problems.


Have you been told your insomnia is because you're anxious or depressed — whether or not you've actually been diagnosed with either one? It's frustrating, because you know your problems aren't all in your head. As a functional sleep coach for the past eight years, I believe insomnia, anxiety, and depression all come from the same root causes. Once you know what those causes actually are, you can fix them — and that means falling asleep easily, staying asleep all night, waking up rested, and feeling calmer and more like yourself during the day.


My client Kerry came to me after years of struggling with sleep. It started when her mom got sick and passed away, then her husband got cancer, and she was going through menopause at the same time. Her diet fell apart because she was so exhausted, and her sleep kept getting worse from there.


She had tried almost everything: sleeping pills, a mindfulness app, hypnotherapy, an herbalist, hormone replacement therapy, a chiropractor, CBD oil, and CBT-I with sleep restriction — which actually made things worse and left her afraid of her own bedroom. She got to the point where she went four to five days without sleeping at all, trembling and shaking from exhaustion. She described her nervous system as falling apart.


Yes, there's a vicious cycle where anxiety and depression affect sleep, and poor sleep makes anxiety and depression worse. But what I find in my clients' lab work is that specific imbalances in the body are driving both sides of that cycle at once — the mental health symptoms and the sleep symptoms aren't two separate problems, they're two symptoms of the same underlying issue.


The first imbalance shows up when you're chronically stressed — from life stressors like Kerry's, from being busy all day with no time to relax, or from underlying health issues you don't even know you have. That stress keeps your body making and releasing cortisol, which makes you feel wired and anxious. Certain imbalances specifically cause cortisol to release at night, which is exactly when it will wreck your sleep. Over time, cortisol can become depleted, and the body switches to adrenaline instead — which makes both the anxiety and the sleep issues even worse. Kerry's nervous system was already in this chronically stressed state, which is part of why sleep restriction was so hard on her body.


The second imbalance is in the gut. If you have pathogens you don't know about — a parasite, bacterial overgrowth, candida, or H. pylori — these are most active at night. They release toxins and cause inflammation, and your body responds to that inflammation by releasing cortisol, which again leaves you feeling anxious and wired in the middle of the night. There's a second gut connection too: 90% of our neurotransmitters are made by the good bacteria in our gut, including serotonin (which converts to melatonin), GABA (which helps us feel calm), and dopamine (which helps regulate the sleep cycle). Without enough of those bacteria doing that job, it becomes very hard to feel calm or fall asleep. Kerry's gut health test showed H. pylori and other bacterial overgrowth.


That leads directly into the third imbalance: depleted neurotransmitters themselves. Many of my clients, Kerry included, test with significantly depleted serotonin, dopamine, and GABA. Without those, it's genuinely difficult to feel calm and switch into sleep mode at night — and this is a good example of how what looks like a purely psychological symptom can have a biological cause underneath it.


The fourth imbalance is hormonal, and it applies to both women and men. Low progesterone, low estrogen, and low testosterone can all cause anxiety, depression, sleep disturbances, and mood swings. So can estrogen dominance — when estrogen is too high relative to progesterone in women, or relative to testosterone in men — which usually happens because the liver is too overburdened with toxins to clear estrogen properly. Kerry had depleted sex hormones and had already tried standard hormone replacement therapy with her doctor, which made things worse. A few months into working on her neurotransmitters, gut health, and cortisol, I recommended she find a doctor to prescribe bioidentical hormone replacement therapy instead — she tolerated that well, and it helped her sleep even more.


The final imbalance I see in so many clients is toxin burden — heavy metals, environmental toxins, and mycotoxins from mold. These accumulate throughout the body, including the brain, which is how they contribute to neurological and mental health symptoms. Toxin burden also strains the liver, and an overburdened liver lets toxins circulate and cause inflammation. The liver is most active between 1 and 3am, so when it's overburdened, that's exactly when the body releases cortisol in response — making it hard to sleep at that specific hour. Based on Kerry's intake forms, I suspected mold toxicity before testing even confirmed it. Fortunately for her, the exposure was in the past, from a previous home, so she didn't need to remediate her current house.


Diet changes, targeted liver support, neurotransmitter support, adrenal support, and bioidentical hormone therapy together were what got Kerry's sleep — and her mood — back. Her progress wasn't linear. She'd have good weeks, then a bad week, then good weeks again, which is normal as the body rebalances. That's part of why I work with clients for six months: so I can remind them a bad night or bad week doesn't mean the plan isn't working.


Hormones, neurotransmitters, gut health, cortisol, and toxins are all connected, and by the time you're dealing with both sleep and mood issues, it's almost always more than one of these systems out of balance. The specifics are different for every client — which is exactly why testing matters more than guessing.


FAQ

Q: Is my insomnia caused by anxiety and depression, or is something else going on?

A: It could be both, or it could be that anxiety, depression, and insomnia all stem from the same underlying imbalances. Chronic stress, gut pathogens, depleted neurotransmitters, hormone imbalances, and toxin burden can each independently cause insomnia, anxiety, and depression — so treating the mental health symptoms alone often won't fix the sleep, and vice versa.


Q: Can gut health really affect my anxiety and depression, not just my digestion?

A: Yes. 90% of your neurotransmitters, including serotonin, GABA, and dopamine, are produced by bacteria in your gut. If you have gut pathogens like H. pylori, candida, bacterial overgrowth, or a parasite — even without digestive symptoms — they're most active at night, release toxins, and trigger inflammation that depletes those same neurotransmitters you need to feel calm and fall asleep.


Q: Why do I feel wired and anxious in the middle of the night?

A: That's usually cortisol. Chronic stress causes your body to release cortisol at night, and gut inflammation or an overburdened liver can trigger the same cortisol response between 1 and 3am specifically, when the liver is most active. That cortisol spike is what's waking you up wired instead of letting you sleep through.


Q: Why isn't my progress improving in a straight line even though I'm doing everything right?

A: Non-linear progress is normal, not a sign that your plan has failed. As the body rebalances hormones, neurotransmitters, gut health, and toxin load, you'll typically see good weeks followed by a harder week before improving again — this rollercoaster pattern is common and expected as multiple systems recalibrate at once.


Ready to Find Your Root Cause?

If chronic stress, gut pathogens, depleted neurotransmitters, hormone imbalances, or toxin burden might be behind your insomnia, anxiety, or depression, this is exactly what the Complete Sleep Solution program investigates. The program includes four functional lab panels — covering gut health, hormones, neurotransmitters, and toxins — plus assessments that identify which of these systems is actually driving your symptoms, so you know exactly what's keeping you awake and anxious, and can build a plan around your own results.

→ Learn how the Complete Sleep Solution program works 


About Martha Lewis 

Martha Lewis is a certified Functional Diagnostic Nutrition practitioner and founder of The Sleep Detective™. Since 2019, she has helped 300+ clients identify the root causes of their insomnia using functional lab testing — including gut analysis, hormone panels, neurotransmitter testing, and toxin screening. She discovered her own root causes (hormone imbalances, heavy metals, and a parasite) after years of trying conventional sleep solutions, and now uses the same investigative approach with her clients.

Learn more about Martha →
















































































































































































Share

Top Categories

Sleep11

© The Sleep Detective