You lie down exhausted. Your body wants rest. Your mind starts racing through tomorrow’s problems, yesterday’s conversations, and a dozen worries that feel urgent at midnight. An hour passes. Then two. You are not alone in this. Trouble falling asleep is one of the most common ways anxiety shows up, and the two conditions feed each other in a loop that can feel impossible to break.
The short answer: anxiety keeps you awake because it activates your body’s stress response, which is designed to make you alert, not sleepy. Your brain treats those racing thoughts as a real threat, so it releases adrenaline and cortisol that block the natural transition into sleep. The good news is that this cycle is well understood, and there are proven ways to interrupt it.
Why Does Anxiety Keep You Awake?
Your body has two branches of the autonomic nervous system that control how alert or relaxed you feel. The sympathetic branch handles the fight-or-flight response. The parasympathetic branch handles rest and digestion. Sleep requires the parasympathetic branch to take over.
Anxiety keeps the sympathetic branch active. When your brain perceives a threat, even a vague one like “what if I fail that presentation,” it releases stress hormones. These hormones raise your heart rate, tense your muscles, and keep your attention sharp. That response is useful in a genuine emergency. At bedtime, it works against you.
There is a detail worth understanding. The brain does not clearly separate real threats from imagined ones. A worry about money activates some of the same circuitry as a physical danger. Your body responds as if the problem needs solving right now. Sleep, from your brain’s perspective, can wait.
Researchers have also found that sleep and anxiety share overlapping brain circuits. The amygdala, a structure involved in processing fear, becomes more reactive when you are sleep-deprived. So poor sleep makes anxiety worse, and worse anxiety makes sleep harder. This bidirectional relationship is well documented in sleep medicine.
What Happens in Your Body When You Can’t Sleep Due to Anxiety?
The physiological sequence is fairly predictable. Your mind starts scanning for threats, a process psychologists call rumination. Your breathing becomes shallower. Your heart rate stays elevated instead of dropping as it normally does before sleep.
Cortisol, the primary stress hormone, follows a daily rhythm. It normally peaks in the morning and reaches its lowest point around midnight. Anxiety can disrupt this curve, keeping cortisol levels higher than they should be at bedtime. Melatonin, the hormone that signals darkness and prepares your body for sleep, may also be suppressed when you are mentally aroused.
Your body temperature normally drops slightly as you approach sleep. Anxiety can interfere with this cooling process too. The result is a body that is physiologically primed for action at the exact moment you need it to power down.
This is not a character flaw or a lack of willpower. It is a measurable biological response. Understanding that can reduce the secondary anxiety many people feel about not sleeping, which only makes the problem worse.
How Do I Stop Anxious Thoughts at Bedtime?
You cannot force your mind to go blank. Trying to suppress thoughts tends to backfire, a phenomenon well established in psychology research. The more you tell yourself not to think about something, the more it intrudes. What you can do is change your relationship with the thoughts and give your nervous system a different signal.
Several approaches have reasonable evidence behind them:
- Scheduled worry time. Set aside 15 minutes earlier in the evening to write down worries and possible next steps. Some clinicians recommend this technique. The goal is to contain rumination to a specific window rather than letting it spill into bedtime.
- Slow breathing. Breathing at a slower rate than normal, with a longer exhale than inhale, activates the parasympathetic response. This is a well-established physiological mechanism, not a placebo.
- Cognitive behavioral therapy for insomnia (CBT-I). This is considered the first-line treatment for chronic insomnia by major medical organizations. It addresses the thoughts and behaviors that maintain sleep problems, including anxiety-driven ones.
- Body scan or progressive muscle relaxation. These techniques shift attention from mental content to physical sensation. Evidence supports their use for sleep onset, though effects vary between individuals.
What does not help: lying in bed trying harder. If you are awake and anxious for what feels like a long stretch, sleep specialists generally recommend getting up and doing something calm in dim light until you feel drowsy. This strengthens the mental link between bed and sleep rather than bed and struggle.
Does Sleep Hygiene Actually Help With Anxiety and Sleep?
Sleep hygiene refers to habits that support good sleep: consistent bedtimes, a dark and cool room, limiting screens before bed, avoiding caffeine late in the day. These practices are widely recommended and form a sensible foundation. But sleep hygiene alone rarely resolves anxiety-driven insomnia.
The evidence for individual sleep hygiene recommendations is mixed. Some are well supported, like keeping a consistent sleep schedule and limiting caffeine. Others, like the precise effect of screen use, have more complicated research findings. None of them address the underlying anxiety that is driving the problem.
Think of sleep hygiene as the floor, not the ceiling. It sets conditions that make sleep more likely. It does not treat the anxiety itself. For that, you typically need approaches that target the worry cycle directly.
One clarification that surprises many people: a strict “perfect” sleep routine can become its own source of anxiety. Some people develop what clinicians call orthosomnia, an unhealthy preoccupation with sleep tracking and sleep perfection. If your bedtime routine has become stressful, that is a signal to simplify it.
When Should I See a Doctor About Anxiety and Sleep?
Occasional sleepless nights from worry are common and usually resolve on their own. But some patterns warrant professional attention.
Talk to a healthcare provider if:
- Sleep problems happen most nights and have lasted for several weeks or longer
- Anxiety is interfering with work, relationships, or daily functioning
- You feel unable to control worry even during the day
- You experience physical symptoms like chest tightness, panic episodes, or persistent restlessness
- You are relying on alcohol or sleep aids to fall asleep regularly
These signs can point to an anxiety disorder, chronic insomnia, or another condition that deserves proper evaluation. Both anxiety disorders and insomnia are treatable. Effective options include cognitive behavioral therapy, and for some people medication. A primary care provider can help sort out what is happening and point you toward appropriate care.
Do not wait for things to become severe. Early support tends to be easier than waiting until sleep and anxiety have both worsened.
Can Anxiety and Insomnia Be Treated Together?
Yes. The overlap between anxiety and insomnia is significant enough that treatment often addresses both at once. Research consistently shows that treating insomnia can reduce anxiety symptoms, and treating anxiety can improve sleep. The relationship runs in both directions.
Cognitive behavioral therapy for insomnia, or CBT-I, is structured and time-limited, typically delivered over a handful of sessions. It includes components like sleep restriction (limiting time in bed to match actual sleep time), stimulus control (rebuilding the bed-sleep association), and cognitive work targeting unhelpful beliefs about sleep. It is not the same as general therapy, though a therapist trained in both can combine approaches.
For anxiety itself, cognitive behavioral therapy has strong evidence. Some people also benefit from medication, which a prescriber can discuss. The right combination depends on the individual, the severity of symptoms, and other health factors. There is no single correct path, and what works for one person may not work for another.
What the evidence does not support is relying on over-the-counter sleep aids as a long-term solution for anxiety-related insomnia. Many have limited evidence for ongoing use and can carry risks. If you find yourself needing them regularly, that is worth discussing with a clinician.
What Can I Do Tonight?
You cannot overhaul your sleep in one evening. But you can give your nervous system a small signal that it is safe to rest. Try slow breathing with a longer exhale. Write down the worry that is loudest and one small step you could take tomorrow. Keep the room dark and cool. If you are still awake after a stretch, get up and do something quiet until drowsiness returns.
Anxiety-driven insomnia is stubborn, but it is not permanent. The loop between worry and sleeplessness can be broken, usually with a combination of the right techniques and, when needed, professional support. Tonight may not be the night everything changes. That is okay. Small consistent steps tend to matter more than any single perfect night.
Frequently Asked Questions
Why can’t I sleep when I feel anxious?
Anxiety activates your body’s stress response, releasing hormones that keep you alert and block the natural transition into sleep. Your brain treats worry as a threat, so it stays on guard instead of powering down.
How do I stop overthinking at night?
Try scheduling a short worry window earlier in the evening and writing down concerns before bed. If your mind still races, slow breathing with a longer exhale can help calm the stress response.
Is it bad to lie in bed awake with anxiety?
Yes, staying in bed while anxious can strengthen the link between bed and struggle. Sleep specialists generally suggest getting up and doing something calm in dim light until you feel drowsy.
When should I see a doctor for anxiety-related insomnia?
See a provider if sleep problems happen most nights for several weeks or more, or if anxiety interferes with daily life. Both anxiety and insomnia are treatable, and early support tends to help.

