Anxiety and poor sleep feed each other in a cycle that can feel impossible to break, but specific, well-tested strategies can interrupt it. The core problem is physiological: when you’re anxious, your brain releases stress hormones that directly suppress deep sleep and increase the number of times you wake up at night. The good news is that you don’t need to eliminate anxiety entirely to sleep well. You need to change the conditions around sleep so your body can override the anxiety signal.
Why Anxiety Disrupts Sleep
Understanding the mechanism helps because it explains why “just relax” doesn’t work. When you’re anxious, your brain produces elevated levels of a stress hormone called CRH, which triggers cortisol release. CRH does two things that wreck sleep: it increases brain wave frequency, pushing you out of deep sleep and into lighter, less restorative stages, and it activates your brain’s wakefulness system. The result is fragmented sleep, less time in the deepest sleep stages, and a shorter total sleep duration.
This isn’t a character flaw or a lack of willpower. In people with chronic insomnia driven by anxiety, researchers have found genuine overactivity in the stress hormone system during the night, when cortisol should be at its lowest. Your body is running a daytime stress response during hours meant for recovery. The strategies below work because they target this system directly, either by calming the stress response or by building such strong sleep pressure that your body overrides the arousal.
Cognitive Behavioral Therapy for Insomnia
If you try only one thing on this list, make it this. Cognitive Behavioral Therapy for Insomnia (CBT-I) is the most effective treatment for insomnia, and it works particularly well for people whose sleep problems are tied to anxiety. About 7 to 8 out of 10 people who go through CBT-I see significant improvement, and the benefits extend beyond sleep: it also reduces symptoms of anxiety and depression.
CBT-I combines several techniques, each targeting a different part of the anxiety-sleep cycle:
- Stimulus control retrains your brain to associate bed with sleep instead of with lying awake worrying. The rules are simple: go to bed only when sleepy, use your bed only for sleep (not screens, reading, or problem-solving), and get up at the same time every morning regardless of how the night went.
- Sleep restriction temporarily limits your time in bed to build stronger sleep pressure. If you’re only sleeping five hours but spending eight hours in bed, you’d start with a five-hour window and gradually expand it as your sleep improves. This sounds counterintuitive, but it’s one of the most powerful tools available.
- Cognitive restructuring helps you identify and change the anxious thoughts that fuel insomnia, like “I’ll never fall asleep” or “Tomorrow will be ruined.” A therapist helps you respond to those thoughts differently rather than trying to force them away.
You can access CBT-I through a trained therapist, and several app-based programs now deliver the same protocol digitally. It typically runs four to eight sessions.
The 15-Minute Rule for Racing Thoughts
One of the most important habits for anxious sleepers comes directly from CBT-I’s stimulus control approach: if you’re lying in bed unable to sleep, get up. Research from the University of Pennsylvania’s behavioral sleep program found that a 15-minute rule is both manageable and effective. If you haven’t fallen asleep within roughly 15 minutes, leave the bedroom, do something quiet and non-stimulating in dim light, and return only when you feel sleepy again.
The goal is to prevent your bed from becoming a place your brain associates with frustration and worry. If watching the clock makes you more anxious (it usually does), turn it away from you and rely on internal cues instead. The moment you notice frustration building or your mind spiraling, that’s your signal to get up. Repeat as many times as needed. It can feel terrible the first few nights, but it retrains the association between bed and sleep surprisingly quickly.
Breathing Techniques That Calm Your Nervous System
Slow, controlled breathing is one of the fastest ways to shift your body out of a stress response. The 4-7-8 technique, developed by Dr. Andrew Weil, is especially useful at bedtime because the long exhale activates the branch of your nervous system responsible for rest and recovery. Inhale through your nose for 4 seconds, hold for 7 seconds, then exhale slowly through your mouth for 8 seconds. Repeat for three to four cycles.
If holding your breath for 7 seconds feels uncomfortable, start with a simpler pattern: inhale for 4 counts, exhale for 6 to 8 counts. The key ingredient is making the exhale longer than the inhale, which slows your heart rate and signals safety to your brain. Practice this during the day too, not just at bedtime. The more familiar the pattern, the more effectively your body responds to it when anxiety is high.
Progressive Muscle Relaxation
This technique works well for people who carry anxiety in their body: tight shoulders, clenched jaw, restless legs. Lie on your back with your arms slightly apart, palms up. Take several slow, deep breaths through your nose, exhaling with a long sigh. Then start at your feet: curl your toes and arch your feet, hold briefly to notice the tension, then release completely and let your feet sink into the mattress.
Move slowly upward through each muscle group: calves, thighs, buttocks, lower back, abdomen, upper back, shoulders, arms, hands, neck, jaw, and forehead. Tense each area for about five seconds, then release. The contrast between tension and release teaches your body what relaxation actually feels like, which is something anxious people often lose track of. If your mind wanders to worries, gently redirect attention to the next muscle group without judgment.
Scheduled Worry Time
If your mind floods with worries the moment your head hits the pillow, try moving those worries to an earlier, deliberate window. The NHS recommends setting aside 10 to 15 minutes before your bedtime routine to write down everything on your mind and brainstorm possible next steps. The point isn’t to solve every problem. It’s to give your brain the signal that these concerns have been acknowledged and recorded, so they don’t need to surface at 2 a.m.
Keep a notebook specifically for this. When a worry pops up during the night, remind yourself it’s already written down and will be there tomorrow. Over time, this creates a mental boundary between “processing time” and “sleep time” that anxious brains badly need.
Set Up Your Bedroom for Lower Arousal
Your sleep environment matters more when you’re anxious because an already-activated nervous system is more sensitive to disruptions. A few adjustments can lower your baseline arousal enough to make a difference.
Temperature is the easiest lever. Your core body temperature needs to drop for sleep to begin, and a warm room fights that process. Keep your bedroom between 60 and 67°F (15 to 19°C). If that feels cold, use breathable bedding and warm socks rather than raising the thermostat.
Weighted blankets provide deep pressure stimulation that has a genuine calming effect. One study found that covering participants with a heavy pad similar to a weighted blanket lowered their cortisol levels during sleep and helped normalize their circadian rhythms. A blanket weighing roughly 10% of your body weight is a common starting point. The sensation is similar to being held, which can be particularly soothing for people who feel physically “wired” at night.
Morning Light Resets Your Internal Clock
What you do in the morning shapes how easily you fall asleep that night. Exposure to natural light within the first 30 to 60 minutes after waking helps calibrate your circadian rhythm, the internal clock that determines when cortisol rises and when melatonin kicks in. When this rhythm is sharp, cortisol peaks in the morning (where it belongs) and drops predictably in the evening, making it easier to wind down.
Step outside for 5 to 15 minutes without sunglasses if possible. You don’t need direct sun; even overcast daylight is far brighter than indoor lighting. This single habit can improve both the timing and quality of your sleep, and it pairs well with everything else on this list.
Magnesium and Other Supplements
Magnesium is one of the more promising supplements for sleep and anxiety, partly because many people don’t get enough from their diet. The recommended daily intake is 310 to 320 mg for adult women and 400 to 420 mg for adult men, depending on age. Magnesium glycinate is the form most commonly recommended for sleep because it’s well absorbed and less likely to cause digestive issues than other forms.
Magnesium plays a role in muscle relaxation and nervous system regulation, which is why deficiency can contribute to both anxiety and poor sleep. That said, supplementation helps most when you’re actually low. If your diet is already rich in leafy greens, nuts, seeds, and whole grains, adding more may not make a noticeable difference. It’s a useful piece of the puzzle for some people, not a standalone solution.
Putting It Together
No single technique will fix anxiety-driven insomnia overnight. The most effective approach layers several strategies: a consistent wake time and morning light exposure to anchor your circadian rhythm, a worry journal in the early evening, a cool and dark bedroom, a breathing or muscle relaxation practice in bed, and the 15-minute rule when sleep doesn’t come. If these self-directed changes aren’t enough after a few weeks, CBT-I with a trained provider is the next step, and it has the strongest evidence of anything available. The cycle between anxiety and sleeplessness is real, but it runs in both directions. Every night of slightly better sleep lowers the next day’s anxiety, which makes the following night a little easier.