Can’t Sleep? What to Do Right Now and Long Term

If you’ve been lying in bed staring at the ceiling, the single most effective thing you can do right now is get up. Staying in bed while awake trains your brain to associate the bed with frustration rather than sleep, making the problem worse over time. What you do in the next 15 to 30 minutes matters more than you might think.

Get Out of Bed After 15 to 20 Minutes

This is the cornerstone of what sleep specialists call stimulus control, and it’s one of the most well-supported techniques in sleep medicine. The rule is simple: if you haven’t fallen asleep (or back to sleep) within roughly 15 to 20 minutes, get out of bed and go to another room. Don’t watch the clock obsessively. Just estimate.

Once you’re up, do something quiet and low-stimulation. Good options include reading a physical book, doing a crossword puzzle, listening to soft music, writing, drawing, or meditating. The activity should be engaging enough to take your mind off not sleeping but boring enough that drowsiness can creep in. When you start feeling genuinely sleepy, not just tired, go back to bed. If sleep doesn’t come again, repeat the whole process. You may need to do this several times in one night, and that’s fine. The goal is to rebuild the association between your bed and actual sleep.

One important rule: don’t fall asleep on the couch. The bed is the only place for sleep.

Calm Your Nervous System With Breathing

When you can’t sleep, your body is often stuck in a low-level stress response. Your heart rate stays elevated, your breathing is shallow, and your muscles hold tension you may not even notice. Breathing techniques work because they activate the branch of your nervous system responsible for calming you down, slowing your heart rate and lowering your blood pressure.

The 4-7-8 method is one of the most popular. Inhale through your nose for 4 seconds, hold for 7 seconds, then exhale slowly through your mouth for 8 seconds. Repeat four cycles. It feels a little awkward the first few times, but the technique becomes more effective with regular practice. Your body essentially gets better at switching into relaxation mode the more often you cue it.

Try the Military Sleep Method

This technique, originally developed for fighter pilots who needed to fall asleep in noisy, uncomfortable conditions, claims to get you to sleep in about two minutes with enough practice. The steps are straightforward: lie on your back, close your eyes, and systematically relax every muscle group from your forehead down to your toes. Start by unclenching your jaw. Let your shoulders drop. Relax your hands. Work your way down through your chest, legs, and feet, giving each area conscious permission to go slack.

The method works because most people carry far more physical tension than they realize, especially after a stressful day. Deliberately releasing it group by group sends a clear signal to your brain that it’s safe to power down. Don’t expect it to work perfectly the first night. Like any skill, it improves with repetition.

Quiet a Racing Mind With Cognitive Shuffling

If your problem isn’t physical tension but a brain that won’t stop generating thoughts, cognitive shuffling is worth trying. It works by replacing structured, meaningful thinking with random, meaningless imagery, which mimics the way your brain naturally behaves as it drifts toward sleep.

Pick a random, emotionally neutral word like “cake.” Take the first letter, C, and visualize as many objects starting with that letter as you can: car, carrot, cottage, candle. Picture each one clearly before moving to the next. When you run out of C words, move to the second letter of your original word (A) and repeat. The key is choosing neutral words. Animals, household objects, things you’d find in a grocery store. Anything emotionally charged defeats the purpose. Most people don’t make it past the second or third letter before falling asleep.

Cool Down Your Bedroom

Your body needs to drop its core temperature by about one to two degrees to initiate sleep. A warm room fights this process directly. The ideal bedroom temperature for adults is between 60 and 67°F (15 to 19°C), which feels cooler than most people keep their homes. For babies and toddlers, the recommended range is slightly higher, between 65 and 70°F.

If you don’t have air conditioning or a thermostat you can adjust, a fan pointed near (not directly at) your body helps. Lightweight, breathable bedding makes a difference too. Even sticking one foot out from under the covers can accelerate heat loss through your skin.

Take a Warm Shower or Bath Earlier in the Evening

This sounds counterintuitive since your body needs to cool down, but a warm shower or bath actually helps that process. Water between 104 and 109°F (40 to 42.5°C) dilates blood vessels near the surface of your skin, especially in your hands and feet. When you step out, heat rapidly dissipates from those areas, pulling your core temperature down faster than it would drop on its own.

A meta-analysis of the available research found that bathing one to two hours before bedtime, for as little as 10 minutes, significantly shortened the time it took people to fall asleep. The timing matters: too close to bedtime and your body hasn’t finished cooling. One to two hours before you plan to sleep hits the sweet spot.

Check Your Caffeine Timing

Caffeine has a half-life of three to six hours, meaning that half the caffeine from your afternoon coffee is still circulating in your bloodstream three to six hours later. A recent clinical trial found that 100 mg of caffeine (roughly one small cup of coffee) can be consumed up to four hours before bed without measurably disrupting sleep. But larger doses change the math significantly: 400 mg, the equivalent of a large coffee shop drink or two standard cups, should be avoided within 12 hours of bedtime.

If you’re sensitive to caffeine, that afternoon pick-me-up at 2 p.m. could easily be the reason you’re staring at the ceiling at 11. Tea, chocolate, and some medications also contain caffeine, so it’s worth auditing your full intake, not just your coffee habit.

Put Screens Away Before Bed

Your brain uses light cues to regulate its internal clock, and the blue light emitted by phones, tablets, and laptops is particularly effective at suppressing melatonin, the hormone that signals your body to prepare for sleep. Blue light peaks at around 470 nanometers on the light spectrum, which happens to be the wavelength your circadian system is most sensitive to.

Night mode and blue-light filters help somewhat, but they don’t eliminate the problem entirely. The content itself, scrolling social media, reading news, responding to messages, keeps your brain engaged and alert. Switching to a physical book, a podcast, or soft music in the last 30 to 60 minutes before bed gives your brain a much cleaner wind-down signal.

Consider Magnesium

Magnesium is one of the few supplements with reasonable evidence behind it for sleep. It plays a role in regulating the nervous system and helps muscles relax. The recommended dose for sleep is 250 to 500 mg taken as a single dose at bedtime.

The form matters. Magnesium citrate has the most research supporting its use for sleep, but it also acts as a strong laxative. Unless you’re dealing with constipation, magnesium glycinate is gentler on your digestive system and generally better tolerated. Magnesium oxide is another option and tends to be cheaper, though it’s less well absorbed. Any of these forms can be found over the counter at most pharmacies.

What to Do Right Now vs. Long Term

If you’re reading this at 2 a.m., your best immediate moves are to get out of bed, do something quiet in dim light, try a breathing or cognitive shuffling technique, and return to bed only when you feel genuinely sleepy. Resist the urge to check the time repeatedly, as counting how many hours you have left before your alarm only increases anxiety.

If sleepless nights are happening more than three times a week and have persisted for three months or longer, you’re likely dealing with chronic insomnia rather than a bad night. The most effective treatment for chronic insomnia isn’t medication. It’s cognitive behavioral therapy for insomnia (CBT-I), a structured program that combines the stimulus control technique described above with sleep restriction, relaxation training, and addressing the thought patterns that keep the cycle going. Many people see significant improvement within four to eight sessions, and the results tend to last longer than what sleep medications provide.