Why anxiety disrupts sleep and what actually helps
Anxiety keeps you awake because your nervous system is in high alert—your brain is scanning for threat, your heart rate rises, and your muscles tense. This state is incompatible with the relaxation sleep requires. You cannot think your way out of it by trying harder to fall asleep, because effort itself keeps you alert. What works instead is shifting your nervous system's state through your body: breathing patterns, physical position, temperature, and what you do in the hour before bed.
The goal is not to eliminate anxiety before sleep—that often fails—but to make your body conditions so unfavorable to wakefulness that sleep becomes the path of least resistance. This means working with your physiology rather than against your worry.
Key Takeaways
- Slow breathing (especially longer exhales) activates your parasympathetic nervous system, which is the biological opposite of anxiety, and works within minutes.
- A cool, dark room and a consistent bedtime routine signal to your body that sleep is coming, reducing the fight your anxiety puts up.
- Lying still in bed while anxious often backfires; getting up and doing a quiet, boring task until you feel drowsy prevents the bed from becoming a place of struggle.
- Caffeine, alcohol, and screens in the evening amplify anxiety's grip on sleep, even if you do not feel their effects consciously.
- If anxiety thoughts spiral when you lie down, writing them down before bed or using a structured worry time earlier in the day can reduce their power.
Breathing techniques that work within minutes
The fastest way to shift your nervous system is through your breath. When you are anxious, your breathing is shallow and fast. Reversing this—making your exhale longer than your inhale—tells your body there is no emergency. A simple pattern is the 4-7-8 technique: breathe in for a count of 4, hold for 7, exhale for 8. The long exhale is the active ingredient. Do this for five to ten cycles when you first get into bed or when you wake at 3 a.m. with your mind racing.
An alternative that requires no counting: breathe in through your nose for any length, then exhale through your mouth slowly, as if you are fogging a mirror. The exhale should take twice as long as the inhale. This is less rigid than the 4-7-8 and works just as well. The point is not perfection; it is the signal you are sending your body that the threat has passed.
What to do if you cannot fall asleep after 20 minutes
Lying in bed while awake and anxious trains your brain to associate the bed with wakefulness and worry. After about 20 minutes of trying, get up. Go to another room—not the kitchen, not somewhere stimulating—and do something boring and quiet in dim light. Read something you do not care about. Fold laundry. Listen to a podcast you have heard before. Stay there until you feel genuinely drowsy, then return to bed.
This sounds counterintuitive when you want sleep, but it works because it breaks the cycle of effort and frustration. Your brain stops treating the bed as a place where anxiety happens. You also avoid the situation where you are lying there checking the clock, calculating how many hours of sleep you can still get, which amplifies anxiety. The goal is to return to bed only when sleep is likely, not to force it.
The hour before bed: what to stop doing
Screens emit blue light that suppresses melatonin, the hormone that makes you sleepy. Stop using your phone, tablet, or computer at least one hour before bed. This is not optional if anxiety is disrupting your sleep; the light itself keeps your nervous system activated. If you use your phone as an alarm, set it across the room so you are not tempted to check it.
Caffeine stays in your system for six to eight hours. If you drink coffee or tea in the afternoon, it is still affecting your sleep at night, especially if you are already anxious. Alcohol might make you drowsy initially, but it fragments sleep and often causes you to wake at 3 or 4 a.m. with your heart racing—a classic anxiety symptom that alcohol actually creates. Cutting both out for two weeks will show you the difference.
Instead, use the hour before bed for something calming: a warm bath, gentle stretching, reading on paper, or sitting quietly. The consistency matters as much as the activity. Your body learns that this hour means sleep is coming, and it begins preparing automatically.
Temperature, darkness, and the physical environment
Your body temperature needs to drop to fall asleep. A cool room (around 65 to 68 degrees Fahrenheit) is ideal. If your bedroom is warm, you will fight sleep even without anxiety. A warm bath or shower an hour before bed actually helps because the temperature drop afterward triggers sleepiness. If you cannot control your room temperature, a fan or open window works.
Darkness signals your brain to produce melatonin. Use blackout curtains or an eye mask. Even small lights—from a clock, a charger, a street lamp—can keep your nervous system slightly activated. If you share a bed with someone who reads or uses a phone, a sleep mask is cheaper and faster than rearranging your room.
Noise is another activator. If you live somewhere loud, earplugs or white noise (a fan, a white noise machine, or a consistent audio track) can help. The consistency is key; your brain learns to filter it out.
Structured worry time and thought management
If your anxiety takes the form of racing thoughts or a to-do list that unfolds when you lie down, try scheduling a "worry time" earlier in the day—say, 3 p.m. for 15 minutes. Write down everything that is bothering you. The act of writing it down tells your brain the thought has been captured and does not need to be rehearsed tonight. When anxious thoughts arise at bedtime, remind yourself: "I already wrote that down at 3 p.m. I will think about it tomorrow."
Another approach: keep a notebook on your nightstand. If a thought or task pops into your head, write it down immediately. This externalizes it—your brain no longer has to hold it. Then let it go. You have documented it; you can address it in the morning.
Do not try to argue with anxious thoughts or convince yourself they are not real. That engages your mind further. Instead, notice the thought, write it down if needed, and return your attention to your breath or body sensation.
When to consider professional support
If you have tried these approaches consistently for three to four weeks and sleep is still severely disrupted, talk to a doctor. Sleep deprivation itself worsens anxiety, creating a cycle that is hard to break alone. A healthcare provider can rule out other causes (thyroid issues, sleep apnea, medication side effects) and discuss options like cognitive behavioral therapy for insomnia (CBT-I), which is specifically designed for this problem and has strong evidence behind it.
Some people also benefit from short-term medication to reset their sleep while they work on the underlying anxiety. This is not a permanent solution, but it can break the cycle long enough for other strategies to take hold. A doctor can help you weigh the options for your situation.
Frequently Asked Questions
Is it okay to take melatonin for anxiety-related insomnia?
Melatonin can help reset your sleep schedule, but it is not a treatment for anxiety itself. It works best if you take it consistently at the same time each evening for a week or two, not as a one-off when you cannot sleep. Talk to a doctor before starting it, especially if you take other medications. It is not addictive, but relying on it without addressing the anxiety underneath often means the problem returns when you stop.
What if my anxiety gets worse when I try to breathe slowly?
Some people with anxiety feel more panicked when they focus on their breath. If that is you, skip the breathing exercises and use a different anchor instead: progressive muscle relaxation (tense and release each muscle group), counting backward from 300, or focusing on physical sensations like the weight of your blanket. The goal is to redirect your attention away from anxious thoughts, not to force a specific technique.
Can I use sleep medication while I work on anxiety?
Yes. Sleep medication and anxiety treatment are not mutually exclusive. Some people need medication short-term to sleep well enough to function while they also address the anxiety through other means. A doctor can help you decide whether medication makes sense for your situation and for how long.
Why does my anxiety get worse right when I try to fall asleep?
Lying down removes external distractions, so your mind has nothing to focus on except itself. This is why the strategies above emphasize redirecting your attention (breathing, body sensation, a boring task) rather than trying to eliminate anxiety. Also, if you have spent the day in a state of alertness, your nervous system may need time to downshift. The hour before bed and a consistent routine help signal that the alert state can end.
Is it normal to wake up at the same time every night with anxiety?
Yes, and it often points to a sleep cycle issue rather than pure anxiety. You might be waking naturally between sleep cycles, and anxiety fills the gap. Try the get-up-and-do-something-boring approach: leave bed, stay in dim light, and return only when drowsy. If this happens every night at the same time for weeks, mention it to a doctor—it can sometimes indicate a sleep disorder that benefits from specific treatment.