How to Sleep When Stressed and Your Mind Won’t Stop

Stress keeps you awake by flipping your body’s chemistry in exactly the wrong direction. Your stress hormones rise, your sleep hormones drop, and your brain stays locked in problem-solving mode when it should be powering down. The good news: you can reverse most of this with specific techniques that work within minutes, not weeks. Here’s what actually helps.

Why Stress Makes It Hard to Fall Asleep

Your body runs on a predictable daily rhythm. Cortisol, your main stress hormone, is supposed to peak in the morning and taper off at night. Melatonin, the hormone that triggers sleepiness, does the opposite: it rises as darkness falls and stays elevated through the night. These two hormones have an inverse relationship. When one is high, the other is low.

Stress breaks this system. When you’re anxious or overwhelmed, cortisol stays elevated into the evening, which directly suppresses melatonin production. The result is a delayed ability to fall asleep and more frequent nighttime awakenings. You’re not imagining it: your body is chemically fighting against sleep.

This kind of stress-related sleep trouble is common and usually temporary. Sleep medicine distinguishes between acute insomnia (lasting less than three months, often triggered by a specific stressful event) and chronic insomnia (difficulty sleeping at least three nights per week for three months or longer). Most stress-driven sleep problems fall into the acute category and resolve as the stressor fades or as you build better coping tools.

Use Your Breath to Flip the Switch

Controlled breathing is the fastest way to shift your nervous system from alert mode into rest mode. The 4-7-8 technique is one of the most studied options, and it works by extending your exhale, which activates the branch of your nervous system responsible for calming you down.

Here’s how to do it: Exhale completely through your mouth with a whooshing sound. Close your lips and inhale silently through your nose for a count of four. Hold your breath for seven seconds. Then exhale slowly through your mouth for a count of eight, making the whooshing sound again. That’s one cycle. Repeat three to four times.

In a controlled study of healthy adults, this technique significantly increased activity in the calming branch of the nervous system while reducing stress-related nervous system activity. The interval between heartbeats lengthened by about 10%, a reliable sign that the body is shifting into a more relaxed state. These changes happened in a single session. Even participants who were sleep-deprived showed measurable improvements in nervous system balance after practicing the technique.

Relax Your Body From the Ground Up

When you’re stressed, you hold tension in muscles you’re not even aware of: your jaw, your shoulders, your lower back. Progressive muscle relaxation (PMR) works by deliberately tensing each muscle group, then releasing it, which teaches your body to recognize and let go of that tension.

Start with your toes and feet. Curl your toes and arch your feet, hold for a few seconds, then release and let your feet sink heavy into the bed. Move slowly upward through your calves, thighs, buttocks, lower back, abdomen, upper back, shoulders, arms, hands, neck, jaw, and forehead. Tense each area briefly, then relax it completely. Breathe softly throughout.

The whole sequence takes about 10 to 15 minutes. Most people notice their body feels noticeably heavier and warmer by the time they reach their shoulders. The key is going slowly enough to really feel the contrast between tension and release. That contrast is what signals your nervous system to stand down.

Write a To-Do List, Not a Journal

Racing thoughts are one of the most frustrating parts of trying to sleep when stressed. Your brain keeps cycling through unfinished tasks, upcoming deadlines, and things you’re worried about forgetting. A study published in the Journal of Experimental Psychology tested a surprisingly simple fix: spending five minutes writing before bed.

Participants who wrote a specific to-do list of tasks they needed to complete in the coming days fell asleep significantly faster than those who journaled about things they had already finished. The more detailed the to-do list, the faster participants fell asleep. The researchers found a direct correlation: each additional item on the list was associated with faster sleep onset. Writing about completed activities, on the other hand, showed the opposite trend and may have actually made it harder to fall asleep.

The takeaway is counterintuitive. You might think that reflecting on accomplishments would be calming, but what your brain actually needs is to offload unfinished business. Write down everything you need to do tomorrow and over the next few days, in as much detail as possible. Bullet points work fine. Once it’s on paper, your brain can stop rehearsing it.

Give Your Mind Something Boring to Do

If a to-do list doesn’t quiet the mental chatter, try giving your brain a task that’s just engaging enough to block anxious thoughts but too boring to keep you awake. One approach is to pick a random letter and slowly visualize unrelated objects that start with that letter: for “B,” you might picture a banana, then a bridge, then a butterfly. The images should be random and unconnected.

This works because your brain struggles to maintain two trains of thought simultaneously. By occupying your visual imagination with neutral, meaningless images, you crowd out the stressful narratives that keep you alert. Research on cognitive training and sleep has found that activities engaging visual processing are specifically associated with faster sleep onset, with improvements in the medium range for people who previously took more than 30 minutes to fall asleep.

Set Your Bedroom Temperature

Your body needs to cool down slightly to initiate sleep, and a warm room works against that process. A large study tracking sleep in community-dwelling adults found that sleep was most efficient and restful when nighttime room temperature stayed between 68 and 77°F (20 to 25°C). When temperatures climbed above 77°F, sleep efficiency dropped by 5 to 10%, a clinically meaningful decline.

If you’re stressed, this matters even more. Stress raises your core body temperature slightly through elevated cortisol, so a cool room helps counteract that effect. Keep your bedroom on the cooler side of that range, use breathable bedding, and consider taking a warm shower before bed. The shower sounds counterintuitive, but the rapid cooling that happens afterward helps trigger sleepiness.

Consider Magnesium

Magnesium plays a role in calming nerve activity and regulating stress hormones. Many people don’t get enough of it through diet alone, and stress itself increases magnesium loss. Magnesium glycinate is one of the better-absorbed forms and is less likely to cause digestive issues than other types. The typical dosage ranges from 200 to 400 mg daily, taken with a meal or before bed.

Magnesium isn’t a sedative. It works more like removing a roadblock: if low magnesium is contributing to muscle tension, restlessness, or an overactive stress response, supplementing can help your body’s natural sleep processes work the way they should. It’s not a replacement for the behavioral techniques above, but it can support them.

Putting It All Together

You don’t need to do everything on this list every night. A practical routine for a high-stress evening might look like this: spend five minutes writing a detailed to-do list, get into a cool bed, work through progressive muscle relaxation from toes to forehead, and finish with three to four rounds of 4-7-8 breathing. The entire sequence takes about 20 minutes and addresses the problem from multiple angles: it offloads mental tension, relaxes physical tension, and shifts your nervous system chemistry toward sleep.

If you’re still awake after 20 to 30 minutes, get up and move to another room. Do something quiet and low-stimulation (reading on paper, not a screen) until you feel drowsy, then return to bed. Lying in bed frustrated trains your brain to associate the bed with wakefulness, which makes the problem worse over time. The goal is to keep your bed linked with sleep, not with stress.