When anxiety keeps you awake, your body is stuck in a state of high alert that directly opposes sleep. Your stress hormones are elevated, your heart rate is up, and your brain is scanning for threats instead of winding down. The good news: specific techniques can interrupt this cycle and help you fall asleep faster, sometimes within minutes. The key is working with your nervous system rather than fighting it.
Why Anxiety Makes It Hard to Sleep
Sleep requires your body to shift from its alert “fight or flight” mode into a calm, restorative state. Anxiety keeps your stress hormone levels elevated, which raises your heart rate and blood pressure. In a normal sleep cycle, these hormones drop to their lowest levels during the night. But when you’re anxious, they stay high, making it physically difficult for your brain to initiate sleep. This isn’t a willpower problem. Your nervous system is genuinely working against you, and the techniques below are designed to flip that switch.
Use 4-7-8 Breathing to Calm Your Nervous System
This is the single fastest tool you can use right now because it directly activates the branch of your nervous system responsible for calming you down. The extended exhale sends a signal to your brain that you’re safe, which lowers your heart rate and relaxes your muscles.
Here’s the pattern: inhale through your nose for 4 counts, hold your breath for 7 counts, then exhale slowly through your mouth for 8 counts. Repeat this cycle at least four times. The long hold and even longer exhale are what make it effective. If 7 and 8 counts feel too long at first, scale everything down proportionally but keep the ratio the same. Within two or three cycles, you’ll likely notice your heartbeat slowing.
Try the Military Sleep Method
This technique was reportedly developed for fighter pilots who needed to fall asleep in stressful conditions. After six weeks of consistent practice, people who use it regularly report falling asleep in about two minutes. Even on your first night, it can significantly shorten the time you spend lying awake.
Start by lying on your back with your eyes closed. Systematically relax every muscle in your body, starting at your forehead and working down to your toes. Spend a moment on each area: your jaw, your shoulders, your arms, your chest, your legs. Give each muscle group conscious permission to go heavy and slack. As you do this, deepen your breathing with long inhales and even longer exhales.
Once your body feels relaxed, immerse yourself in a calming mental scene. Picture yourself in a canoe on a still river at sunset, or lying on a warm beach listening to waves. Use all your senses: the warmth on your skin, the sound of water, the smell of the air. When your mind wanders back to worry, gently return to the scene without frustration. The visualization gives your brain something neutral to process instead of looping through anxious thoughts.
Progressive Muscle Relaxation
If your anxiety shows up as physical tension (clenched jaw, tight shoulders, restless legs), progressive muscle relaxation is particularly effective. It works by deliberately tensing each muscle group and then releasing it, which creates a deeper relaxation than simply trying to “let go.”
Lie on your back with your palms facing up, slightly away from your body. Take several slow, deep breaths through your nose, exhaling with a long sigh. Start with your toes and feet: curl your toes and arch your feet, hold for about five seconds, then release completely. Let your feet sink into the mattress and feel them getting heavy. Move slowly upward through your calves, thighs, buttocks, lower back, abdomen, upper back, shoulders, arms, hands, neck, jaw, and forehead. Tense each area, hold briefly, then release. By the time you reach your forehead, your body will feel noticeably heavier and warmer. If anxious thoughts interrupt, don’t engage with them. Just redirect your attention back to whichever muscle group you’re working on.
Cognitive Shuffling: A Distraction That Actually Works
One reason anxiety keeps you awake is that your brain treats worried thoughts as important signals that need attention. Cognitive shuffling works by replacing those thought patterns with random, meaningless imagery that mimics the scattered thinking your brain naturally produces as it drifts toward sleep.
Pick a random, emotionally neutral word like “beach.” Take the first letter, B, and picture as many objects as you can that start with that letter: butterfly, basketball, bicycle, barn, blueberry. Visualize each one clearly before moving to the next. When you run out of B words, move to the next letter, E, and repeat. The images should be unconnected and boring. That’s the point. Your brain can’t simultaneously generate random images of basketballs and barns while also maintaining an anxious thought loop. Most people don’t make it past the second or third letter before they’re asleep.
Set Up a Scheduled Worry Time
Much of nighttime anxiety comes from your brain trying to process unresolved worries it didn’t have time for during the day. A scheduled worry period gives those thoughts a designated home so they’re less likely to ambush you at bedtime.
Choose a specific time, place, and duration for worrying each day. Something like 6 p.m. at your desk for 20 minutes. During that window, write down everything that’s bothering you. Be specific: not just “work stress” but “I’m worried about the deadline on Thursday and I haven’t started the report.” When the 20 minutes are up, close the notebook and move on. The critical rule is that the worry period should not be close to bedtime. If anxious thoughts pop up while you’re in bed, remind yourself that you’ve already dealt with them and they have an appointment tomorrow at 6 p.m.
If You Can’t Sleep, Get Up
This advice feels counterintuitive, but it’s one of the most well-supported techniques in sleep science. If you’ve been lying in bed for what feels like 15 to 20 minutes without falling asleep, get out of bed. Go to another room and do something quiet and unstimulating: read a physical book, fold laundry, sit in dim light. Return to bed only when you feel genuinely sleepy again.
The reason this works is that lying awake in bed with anxiety trains your brain to associate your bed with stress and wakefulness. Over time, just getting into bed can trigger anxious alertness. By leaving when you can’t sleep and returning only when drowsy, you retrain that association so your bed becomes a cue for sleep rather than worry. This is a core principle of cognitive behavioral therapy for insomnia, which is considered the most effective long-term treatment for sleep problems tied to anxiety.
Optimize Your Bedroom Environment
Your room temperature has a direct effect on how quickly you fall asleep. Your body needs to drop its core temperature slightly to initiate sleep, and a warm room makes that harder. Keep your bedroom between 60 and 67°F (15 to 19°C). Think of your bedroom as a cool, dark cave.
Beyond temperature, reduce anything that might feed anxiety. Put your phone face down or in another room entirely. Checking the time when you can’t sleep almost always increases frustration and makes it harder to drift off. If silence makes your anxious thoughts louder, use a white noise machine or a fan to create steady background sound that gives your brain something neutral to latch onto.
Magnesium and Sleep
Many people with anxiety are low in magnesium, a mineral that plays a role in calming nerve activity. Magnesium glycinate is the form most commonly recommended for sleep because it’s well absorbed and less likely to cause digestive issues. The recommended daily intake for adults is 310 to 420 mg depending on your age and sex. For men over 31, the target is 420 mg per day. For women over 31, it’s 320 mg. You may already get some of this through food (dark leafy greens, nuts, seeds), so a supplement fills in the gap rather than replacing your diet.
Magnesium isn’t a sedative and won’t knock you out the way a sleeping pill would. It works gradually over days to weeks by supporting the calming pathways in your nervous system. If you’re looking for something to take tonight that will help, pair it with the breathing and relaxation techniques above. Those will give you immediate relief while magnesium builds up in the background.
When Anxiety and Sleep Problems Need More Help
The techniques above work well for occasional or moderate sleep anxiety. But if you’ve been experiencing excessive worry more days than not for six months or longer, and it’s paired with symptoms like constant restlessness, muscle tension, difficulty concentrating, irritability, and ongoing sleep disruption, that pattern matches the diagnostic criteria for generalized anxiety disorder. At that point, self-help techniques alone may not be enough, and structured treatment, particularly cognitive behavioral therapy, can make a significant difference. If anxiety is severely impairing your ability to function at work, in relationships, or in daily life, a referral to a behavioral health specialist is a reasonable next step.