How to Stop Thinking About Something When Trying to Sleep

Racing thoughts at bedtime are not just annoying. They trigger a real physiological response that keeps you awake. When you replay a stressful conversation or worry about tomorrow’s to-do list, your body releases cortisol, the same stress hormone that spikes when the original event happens. Research from the University of Surrey found that people who ruminate heavily at night had significantly higher cortisol levels at 10 p.m., woke nearly 20 minutes earlier than low ruminators, and reported more frequent nighttime awakenings. The good news: several techniques can interrupt this cycle, and most of them work by giving your brain something boring or meaningless to chew on instead.

Why Your Brain Won’t Quiet Down

Your brain doesn’t distinguish well between thinking about a stressor and actually experiencing it. Simply recalling a difficult moment produces the same physiological arousal that accompanied the original event. This is called perseverative cognition, and it essentially keeps your stress response running long after the workday or the argument ended. Cortisol stays elevated, your heart rate remains slightly up, and your body stays in a state that researchers sometimes call “tired but wired.”

This matters because sleep onset requires your nervous system to downshift. Your core body temperature needs to drop, your heart rate needs to slow, and your brain needs to stop treating the environment like it contains a threat. Rumination blocks all three. So the most effective strategies work on two fronts: calming the body’s stress response and redirecting the mind away from repetitive thought loops.

The Cognitive Shuffle

This is one of the most effective mental redirection techniques, and it works precisely because it’s meaningless. Your brain has trouble falling asleep while processing logical, emotionally charged thoughts. But when you force it to jump between random, unconnected images, it mimics the fragmented thinking that naturally occurs as you drift off.

Here’s how to do it: pick a simple, neutral word like “lamp” or “door.” Take the first letter and think of as many words starting with that letter as you can, visualizing each one. If your word is “lamp,” you’d picture a lemon, then a ladder, then a laptop, and so on. When you run out of L-words, move to A-words, then M-words, then P-words. The randomness is the point. You’re not building a story or solving a problem. You’re generating a stream of disconnected images that gradually pulls your attention away from whatever was keeping you up. Most people don’t make it past the second or third letter.

The Alphabet Game

If the cognitive shuffle feels too unstructured, the alphabet game adds a bit more scaffolding. Pick a category you know well, like animals, cities, or foods. Then mentally name one example for each letter of the alphabet in order: alligator, bear, catfish, dolphin. The key is choosing a category familiar enough that you don’t have to strain. If you get stuck on Q or X, skip them and keep going. Getting frustrated defeats the purpose.

Both this and the cognitive shuffle work for the same reason. They occupy just enough mental bandwidth to crowd out worry, but not enough to actually wake you up further. Think of it as giving your brain a pacifier.

Deal With Worries Before Bed, Not In Bed

If the same concerns show up night after night, a pre-bed worry download can help. Set aside 10 to 15 minutes earlier in the evening, well before you get into bed, and write down what’s on your mind. For each item, ask yourself two questions: is this something I can actually control, and if so, what’s one concrete step I can take tomorrow? Write the step down. For concerns you can’t control, simply acknowledging them on paper often reduces their power at 11 p.m.

The goal isn’t to solve everything. It’s to give your brain a signal that these problems have been noted, a plan exists (or doesn’t need to), and it’s safe to let go for the night. Without this step, your mind tends to keep circling back to unfinished business as if it’s afraid you’ll forget.

Calm Your Body First

Sometimes the thoughts aren’t the root problem. They’re a symptom of a body that’s still running too hot. Breathing exercises can directly slow your heart rate and lower blood pressure, shifting your nervous system out of its alert state.

The 4-7-8 method is simple: inhale through your nose for four counts, hold for seven counts, exhale slowly through your mouth for eight counts. Repeat three or four times. The long exhale is what does the heavy lifting. It activates the branch of your nervous system responsible for rest and digestion, which is the opposite of the stress response driving your racing thoughts. If counting feels distracting, even just lengthening your exhales relative to your inhales produces a similar effect.

Temperature matters too. Your bedroom should be between 60 and 67°F (15 to 19°C). A cool room helps your core temperature drop, which is a prerequisite for deep sleep. If your room is warm, even the best mental techniques are fighting an uphill battle.

The 20-Minute Rule

If you’ve been lying awake for roughly 20 minutes, or if you notice yourself starting to feel frustrated about not sleeping, get out of bed. Move to another room, do something quiet and low-stimulation (reading a physical book, light stretching, listening to calm audio), and return to bed only when you feel sleepy again. If another 20 minutes pass without sleep, repeat the process.

This feels counterintuitive, but it’s one of the core strategies in cognitive behavioral therapy for insomnia. The logic is straightforward: the longer you lie awake feeling anxious, the stronger the association your brain builds between your bed and wakefulness. Over time, just getting into bed can trigger alertness. Getting up breaks that association and preserves your bed as a place where sleep actually happens.

Visualization as a Sleep Aid

If word-based games don’t appeal to you, try a mental walkthrough of a familiar, calming place. One popular version is the mental home tour: picture yourself walking through a house you know well, room by room, noticing small details like the color of the walls, the texture of the carpet, where the light falls. The specificity is what makes it work. You’re occupying your visual cortex with neutral, detailed imagery that leaves little room for stressful thoughts to intrude.

Another option is the 5-4-3-2-1 grounding technique, adapted for bed. With your eyes closed, imagine five things you could see in a peaceful place, four things you could touch, three you could hear, two you could smell, and one you could taste. This pulls your attention into sensory experience and away from abstract worry.

What About Supplements

Magnesium glycinate is one of the more commonly recommended supplements for nighttime restlessness. It’s a form of magnesium bound to glycine, an amino acid that has been shown to improve sleep quality and reduce stress levels. It’s well absorbed and unlikely to cause digestive issues. That said, it’s not a silver bullet for racing thoughts. It works best as one piece of a broader routine rather than a standalone fix. If you’re considering it, a typical dose ranges from 200 to 400 mg taken an hour or so before bed.

Building a Consistent Wind-Down

None of these techniques work as well in isolation as they do together. The most reliable approach combines three elements: offloading your worries before you get into bed, calming your body with breathing or a cool environment, and having a go-to mental redirection technique ready for when thoughts intrude anyway. Over a week or two of consistent practice, your brain starts to associate the routine itself with sleep onset, making each individual step more effective than it was on night one.

Screens deserve a mention here, not because blue light is the sole villain it’s often made out to be, but because scrolling through your phone keeps your brain in input-processing mode. Switching to a physical book, an audio track, or one of the techniques above at least 20 to 30 minutes before your target sleep time gives your nervous system a real chance to wind down before you ask it to shut off entirely.