To stop racing thoughts at night, give your brain a different job. Write a specific to-do list before bed, which helped people fall asleep faster in a 2018 study. Set aside worry time earlier in the evening, and try cognitive shuffling or 4-7-8 breathing once the light is off. If it goes on for weeks, ask a doctor about CBT-I.
The CDC estimates that about a third of US adults regularly get less than the recommended seven hours of sleep, and a mind that won't shut off is one of the most common reasons. If you're reading this at midnight with your brain cycling through tomorrow's to-do list, a conversation you had six years ago, and whether you locked the front door, you're not alone and you're not broken.
Stopping racing thoughts isn't about willpower or telling yourself to "just relax." That has never worked. It's about specific techniques that interrupt the loop. Here are nine with real evidence behind them.
One thing up front: this is general information, not medical advice, and these are self-help techniques. They're not a treatment for an anxiety disorder or depression. If worry is taking over your days as well as your nights, talk to your doctor or a licensed therapist. If you're in crisis or having thoughts of harming yourself, call or text 988 to reach the Suicide & Crisis Lifeline.
1. Cognitive shuffling
This might be the most useful technique on the list that hardly anyone has heard of. Developed by cognitive scientist Luc Beaudoin at Simon Fraser University, cognitive shuffling gives your brain a task that's too dull to keep it alert but too varied to let it drift back to worrying.
Pick a random word, say "garden." For each letter, picture unrelated objects that start with it. G: giraffe. A: anchor. R: rainbow. D: drum. E: envelope. N: necklace. Then pick another word and repeat. The images should be random and unconnected. It's hard to generate random pictures and keep a worry thread going at the same time.
Beaudoin's theory is that this scrambled imagery resembles the drifting, disconnected thoughts people have as they fall asleep. The research is still early, but the technique is free, harmless and easy to try tonight.
2. Structured worry time
This sounds backward, but it's a well-supported technique from cognitive behavioral therapy. Set aside 15 to 20 minutes earlier in the evening, well before bed, and write down everything that's worrying you. For each worry, write one concrete action you can take tomorrow.
Psychologists link this to the Zeigarnik effect: unfinished tasks keep nagging at you until they have a plan attached. Writing the worry down with a next step lets your brain set it aside. When the same thought pops up at bedtime, you can remind yourself it's already been dealt with.
A bedtime journal gives the process some structure, so you're not staring at a blank page.
3. The 4-7-8 breathing technique
Breathing exercises aren't new advice, but 4-7-8 is easy to remember. Inhale through your nose for 4 seconds, hold for 7, exhale slowly through your mouth for 8. Repeat four times.
The long exhale is the important part. Slow breathing with extended exhales engages the parasympathetic nervous system, the "rest and digest" side, and can slow your heart rate. That works against the fight-or-flight state racing thoughts tend to keep you in.
Each cycle takes about 19 seconds, so four rounds is under a minute and a half. If your mind wanders during the counting, that's normal. The counting gives your brain something structured to hold onto.
4. Body scan meditation
Lie flat and move your attention slowly through your body, starting at your toes and working up. Spend about 10 seconds on each area, noticing any tension without trying to change it. Toes, feet, ankles, calves, knees, thighs, hips, stomach, chest, hands, arms, shoulders, neck, face, scalp.
A 2015 randomized clinical trial in JAMA Internal Medicine found that a mindfulness program, which included body scan practice, improved sleep quality in older adults with moderate sleep problems. The idea is simple: it's hard to focus on your body and rehearse your worries at the same time. Each time you notice your mind has wandered, bring it back to wherever you were.
You don't need an app, but guided versions on YouTube or in meditation apps help if your mind keeps wandering.
5. The "brain dump" before bed
Simpler than structured worry time. Write down everything in your head. No structure, no analysis, no next steps. Just get it out of your skull and onto a page.
A 2018 study in the Journal of Experimental Psychology found that people who spent five minutes writing a to-do list before bed fell asleep significantly faster than those who wrote about tasks they'd already finished. The more specific the list, the faster they fell asleep.
Keep a notebook or a bedtime journal on your nightstand and make it the last thing you do before turning off the light. There's more on this in our guide to journaling before bed.
6. Temperature manipulation
Your core body temperature drops by roughly 2°F as you head toward sleep. A warm bath or shower 60 to 90 minutes before bed helps that along. The warm water draws blood to your skin, and when you get out, heat escapes faster and your core cools.
A 2019 meta-analysis in Sleep Medicine Reviews screened more than 5,000 studies and pooled the small number that met its criteria. It found that a warm bath or shower 1 to 2 hours before bedtime helped people fall asleep faster and improved sleep quality, with water at about 104 to 108.5°F.
This doesn't stop racing thoughts directly. It changes the conditions around them, and it's harder to keep ruminating when your body is already winding down.
7. Sensory anchoring
Give your brain something non-threatening to notice instead of your thoughts. It's the same principle as cognitive shuffling, but through your senses instead of imagery.
Lavender pillow spray is a popular choice. A 2012 study found lavender inhalation improved sleep quality in women with insomnia. This Works Deep Sleep Pillow Spray (lavender, chamomile and vetivert, about $33 for 2.5 fl oz, 4.3 stars from roughly 22,800 reviews) is the best-known version. Whether it's the lavender or the association of "this smell means sleep," a lot of people find it helps.
Other anchors: brown noise or white noise at low volume, an eye mask to cut out visual input, or the feel of the comforter against your skin.
You're not trying to suppress the thoughts. You're pointing your attention at something that doesn't feed them.
8. Magnesium supplementation
Magnesium is involved in more than 300 enzyme reactions in the body, including some tied to nerve function and sleep. According to the NIH Office of Dietary Supplements, dietary surveys consistently show many Americans get less than the recommended amount from food, and low magnesium has been linked to poorer sleep.
The evidence that a supplement improves sleep is limited and mixed, though. A small 2012 trial in older adults found improvements in insomnia scores and sleep time, but it used 500 mg a day, which is above the NIH Office of Dietary Supplements' upper limit of 350 mg a day of supplemental magnesium for adults (magnesium from food doesn't count). Magnesium is most likely to help if you're actually low in it.
If you want to try it, glycinate forms tend to be gentler on the stomach than magnesium oxide. Doctor's Best High Absorption Magnesium Glycinate Lysinate has 200 mg of magnesium per serving, which keeps you under that limit. Check with your doctor or pharmacist first, especially if you have kidney disease or take medications, since magnesium can interact with some antibiotics and other drugs. Supplements aren't FDA-approved for safety or effectiveness before sale. Our magnesium for sleep guide compares a few options.
9. The "constructive worry" reframe
If none of the above stops a particular thought from coming back, change how you respond to it. Instead of fighting it, name it: "I notice I'm worrying about the presentation tomorrow." Then ask two questions. "Can I do anything about this right now?" and "Will this matter in five years?"
If you can do something, write the action down and schedule it. If you can't, you're spending energy on something outside your control at a time you could be sleeping. This is a simplified version of acceptance and commitment therapy (ACT), which has growing evidence for insomnia.
The useful distinction is between productive worry, which leads to a plan, and unproductive worry, which loops. A bedtime journal can help you sort one from the other.
What doesn't work
Telling yourself to stop thinking. Thought suppression research shows that trying not to think about something makes you think about it more. Daniel Wegner's "don't think of a white bear" experiments showed this in the 1980s.
Scrolling your phone. Bright light, content designed to hook you and a steady stream of new information make racing thoughts worse. If you're reading this on your phone in bed right now, finish the article and then put it down.
Alcohol. It may help you fall asleep, but it fragments sleep, suppresses REM and often wakes you at 3 or 4am, which is exactly when the racing thoughts come back.
Building a routine that actually works
No single technique fixes this. People who get racing thoughts under control usually combine two or three approaches into a consistent bedtime routine.
A practical combination: structured worry time at 8pm (pen and paper, 15 minutes), a warm shower at 9pm, lavender spray and a five-minute brain dump at 10pm, then cognitive shuffling once the light is off. Within a week or two, the routine itself starts telling your brain that the thinking part of the day is over.
Our guide to building a bedtime routine for adults who can't sleep goes into more detail.
If racing thoughts keep you up for several weeks despite trying these, see your doctor. Ask about CBT-I (cognitive behavioral therapy for insomnia). The American College of Physicians recommends it as the first treatment for chronic insomnia in adults, and it tends to work better than sleeping pills over the long term.
Related reading:
- Best Magnesium Supplements for Sleep 2026
- Do Weighted Blankets Actually Help With Anxiety and Sleep?
- The Best Bedtime Routine for Adults Who Can't Sleep
- Journaling Before Bed: How Writing Down Your Thoughts Helps You Sleep
Sources
- Liu Y, et al. "Prevalence of Healthy Sleep Duration among Adults, United States, 2014." CDC, MMWR, 2016.
- Black DS, et al. "Mindfulness meditation and improvement in sleep quality and daytime impairment among older adults with sleep disturbances." JAMA Internal Medicine, 2015.
- Scullin MK, et al. "The Effects of Bedtime Writing on Difficulty Falling Asleep: A Polysomnographic Study Comparing To-Do Lists and Completed Activity Lists." Journal of Experimental Psychology: General, 2018.
- Haghayegh S, et al. "Before-bedtime passive body heating by warm shower or bath to improve sleep: A systematic review and meta-analysis." Sleep Medicine Reviews, 2019.
- Wegner DM, et al. "Paradoxical effects of thought suppression." Journal of Personality and Social Psychology, 1987.
- Qaseem A, et al. "Management of Chronic Insomnia Disorder in Adults: A Clinical Practice Guideline From the American College of Physicians." Annals of Internal Medicine, 2016.



