MindVibe Health Resources
Can't Sleep? When Insomnia Is a Mental Health Problem
Insomnia and mental health are a two-way street. Learn how to tell whether anxiety or depression is behind your sleepless nights, why sleeping pills alone often disappoint, and what actually helps.
You can't sleep, your mind won't shut off, and you're starting to wonder whether this is a sleep problem or a mental health problem. Very often it's both: insomnia is one of the most common symptoms — and one of the earliest warning signs — of anxiety and depression, and each one makes the other worse. There is a specific, structured treatment designed to retrain sleep, and while how much it helps varies from person to person, figuring out what's actually driving your sleeplessness is the first step.
Is it "just insomnia," or is something else going on?
Doctors used to split insomnia into two boxes: "primary" insomnia, a sleep problem all on its own, and "secondary" insomnia, a symptom of something else, like depression. In real life that line turned out to be blurry, because the relationship almost always runs in both directions. Poor sleep worsens anxiety and mood; anxiety and low mood worsen sleep. That's why current diagnostic practice treats insomnia disorder as a condition worth diagnosing and treating in its own right, whatever else is happening alongside it.
Still, certain clues suggest a mental health condition is doing the driving:
- Your daytime symptoms are bigger than tiredness. Worry, dread, irritability, or loss of interest that show up even after a decent night's sleep suggest the sleep problem isn't the whole story.
- The mood or the worry came first. If you can trace the anxiety or low mood back to before the sleep trouble started, treating only the sleep is likely to disappoint.
- Your sleep tracks your stress. Sleep that collapses during a hard stretch and recovers when life calms down points toward what's happening in your mind, not a broken sleep system.
None of this means you should try to diagnose yourself at 3 a.m. It means the question worth bringing to a clinician isn't only "how do I sleep?" but "why can't I?"
Why do racing thoughts start the second I lie down?
During the day, your to-do list, your phone, and other people compete for your attention. At night, the noise drops away — and for an anxious brain, that quiet is an invitation. Worry expands to fill the space.
Two things then make it worse. First, your brain learns by association. If you spend enough nights lying in bed worrying, the bed itself becomes a cue for wakefulness and dread rather than sleep. Many people notice they can doze off on the couch but snap wide awake the moment they get into bed. That's conditioned arousal, and it's one of the main targets of insomnia treatment.
Second, worry about sleep becomes its own fuel. "If I don't fall asleep in the next hour, tomorrow is ruined" is an anxious thought, and anxious thoughts raise your heart rate and keep you alert — the opposite of what sleep requires. Trying harder to sleep reliably backfires.
If the racing thoughts aren't limited to bedtime — if worry follows you through the day, interferes with work or relationships, or comes with physical tension or panic — the insomnia may be one face of an anxiety disorder. In that case, treating the anxiety itself is usually part of fixing the sleep, not an optional extra.
Could my insomnia actually be depression?
It might be, and the pattern of your sleep offers hints. A classic depression pattern is waking in the early hours — 3 or 4 a.m. — and being unable to get back to sleep, often with a heavy, hopeless feeling. Some people with depression have the opposite problem and sleep far more than usual yet never feel rested. And for some, insomnia is the first symptom they notice, showing up before the sadness does.
Ask yourself what the daytime looks like. Loss of interest in things you used to enjoy, low energy that a good night doesn't fix, changes in appetite, trouble concentrating, feelings of worthlessness — if several of those are present alongside the insomnia, it's worth being evaluated for depression rather than treating the sleep alone.
One pattern deserves special mention: a reduced need for sleep. If there are stretches where you sleep three or four hours and feel energized rather than exhausted — full of ideas, talkative, unusually productive or impulsive — that's a pattern worth describing to a clinician in its own right, because it may point to something other than insomnia. It can be a sign of a mood episode, and it's one of the features clinicians look for when evaluating for bipolar disorder. The distinction matters because the treatment is different, and some sleep medications and antidepressants can make things worse if bipolar disorder is missed.
What if it's not anxiety or depression?
Several other conditions commonly show up first as a sleep complaint:
- ADHD. Many adults with ADHD describe being lifelong night owls whose brains "switch on" at night. Difficulty winding down, losing track of time until 2 a.m., and a sleep schedule that drifts later and later can all be part of the picture. If that sounds familiar and you also struggle with focus, follow-through, or restlessness during the day, an ADHD evaluation may explain more than the insomnia.
- Trauma. Nightmares, jolting awake with your heart pounding, needing to check the locks, or dreading sleep itself are common after trauma. The body stays on guard when it should be powering down. Trauma-focused treatment addresses the alarm system that's keeping you awake, which sleep aids alone cannot do.
- OCD. Bedtime rituals that stretch longer and longer, repeated checking, or intrusive thoughts that spike at night can steal hours of sleep. If getting to bed involves a sequence you can't skip without intense anxiety, treatment for OCD targets the actual problem.
- Substances. Alcohol helps people fall asleep and then fragments the second half of the night. Caffeine and stimulants linger longer than most people expect. And insomnia is one of the hardest parts of opioid withdrawal — people working on getting off opioids with medication support often find sleep is where the struggle shows up first.
Why haven't sleeping pills fixed the problem?
Sleeping pills can be genuinely useful for short stretches — a crisis, jet lag, the first weeks of a new treatment. But for chronic insomnia they tend to disappoint, for a few reasons.
Most sedating medications lose some of their effect over time, so the dose that worked in month one may not work in month six. Some, particularly benzodiazepines and the "Z-drugs," carry risks of dependence, and stopping them abruptly can cause rebound insomnia that feels worse than the original problem — which is why you should never stop them suddenly without talking to your prescriber.
More fundamentally, a pill sedates you; it doesn't retrain your sleep or treat what's underneath. If anxiety, depression, trauma, or a conditioned bed-equals-wakefulness association is driving the insomnia, medication puts a lid on the symptom while the cause keeps simmering. That's the pattern behind the familiar story: "the pills worked for a while, then they didn't."
This doesn't mean medication has no role. It means medication alone is rarely the whole plan.
What is CBT-I, and why do doctors recommend it before pills?
Cognitive behavioral therapy for insomnia (CBT-I) is a short, structured treatment — typically a handful of sessions — that retrains your sleep. In its 2016 clinical practice guideline on the management of chronic insomnia disorder in adults, the American College of Physicians recommends CBT-I as the first-line treatment, ahead of medication.
CBT-I is not "sleep hygiene tips." Its core tools are more targeted:
- Stimulus control rebuilds the association between your bed and sleep: bed is for sleeping, and if you're lying awake and wired, you get up and return only when sleepy. Over weeks, the bed stops being a cue for worry.
- Sleep consolidation temporarily limits your time in bed to roughly the amount you're actually sleeping. It sounds counterintuitive and the first week is hard, but it builds sleep pressure so that sleep becomes deeper and more continuous, and then the window is gradually expanded.
- Cognitive work targets the thoughts that keep you alert — the catastrophizing about tomorrow, the clock-watching math, the pressure to force sleep.
CBT-I can be used even when insomnia coexists with depression or anxiety, and it's often combined with treatment for the underlying condition. Unlike a pill, the skills it teaches stay with you after the treatment ends, because you've changed the system rather than sedated it.
When should I get a psychiatric evaluation for insomnia?
Consider an evaluation if any of these fit:
- Insomnia has lasted more than a few months, or it keeps returning.
- Daytime symptoms — persistent worry, low mood, loss of interest, panic, irritability — travel with it.
- You've had stretches of needing very little sleep while feeling energized.
- Nightmares, flashbacks, or fear of sleep are part of the picture.
- Sleep medication has stopped working, or you're worried about your use of it or of alcohol to get to sleep.
- Sleeplessness is affecting your safety — nodding off while driving, mistakes at work, or thoughts of not wanting to be here.
On that last point: sleep deprivation and hopelessness are a dangerous combination. If you're having thoughts of harming yourself, call or text 988, the Suicide & Crisis Lifeline, any time, day or night.
As part of an evaluation, clinicians often use a brief structured questionnaire to put a number on how severe the insomnia is — it won't diagnose you, but it gives you and your clinician a shared starting point and a way to track change over time. Scheduling an initial appointment gets you a full evaluation that looks at sleep, mood, anxiety, medications, and substances together, because that's the only way to find out which thread to pull first. If cost is a concern, you can check whether we accept your insurance before you book, and you can read about the clinicians who would be evaluating you ahead of time.
Frequently asked questions
How many bad nights count as insomnia?
Everyone has rough nights. Under the DSM-5, the diagnostic manual clinicians use, chronic insomnia is generally diagnosed when sleep trouble happens at least three nights a week, lasts three months or more, and causes real daytime problems — fatigue, poor concentration, irritability — despite having adequate opportunity to sleep.
Can insomnia cause anxiety, or only the other way around?
Both. Anxiety disrupts sleep, and sleep loss makes the brain more reactive to stress, so insomnia can amplify or help trigger anxiety. That loop is exactly why treating only one side often fails.
Will an antidepressant help me sleep?
Sometimes — some antidepressants are sedating and some become sleep-friendly as the depression improves — but others can be activating, especially early on. This is a conversation to have with your prescriber, not a reason to avoid treatment.
Is it safe to just stop my sleeping pill?
Not without medical guidance. Some sleep medications, especially benzodiazepines, need to be tapered. Stopping abruptly can cause rebound insomnia and, with some medications, withdrawal symptoms that can be serious.
Does melatonin work?
Melatonin is more of a timing signal than a sedative. It can help shift a sleep schedule — jet lag, night-owl patterns — but for chronic insomnia driven by anxiety or depression, it usually isn't enough on its own.
Should I nap to catch up on lost sleep?
Generally no, if you have insomnia. Naps reduce your sleep pressure at night and feed the cycle. If daytime sleepiness is severe, mention it in your evaluation — it can also point to other sleep disorders like sleep apnea.
Can I do CBT-I if I'm already taking medication?
Yes. CBT-I is often done alongside medication, and for many people it eventually makes a taper possible. Don't change your medication on your own — coordinate with your prescriber.
---
This article is for educational purposes only and is not a substitute for professional medical advice, diagnosis, or treatment. If you are in crisis or having thoughts of self-harm, call or text 988 to reach the Suicide & Crisis Lifeline, or call 911 in an emergency.
Ready for depression psychiatry support?
MindVibe offers psychiatric evaluation and medication management for depression online and in person in Texas and California.
