If you’re lying awake wondering why sleep won’t come, the answer is almost always one of a handful of causes: stress, screens, caffeine, an uncomfortable room, or a medical condition you haven’t identified yet. Often it’s several of these stacking on top of each other. The good news is that most sleep problems have clear, fixable triggers once you know where to look.
Your Brain Won’t Quiet Down
The most common reason people can’t fall asleep is what sleep researchers call cognitive hyperarousal. In plain terms, your brain is too active. You’re replaying conversations, running through tomorrow’s to-do list, or worrying about things you can’t control at 1 AM. This isn’t just annoying. It creates a measurable physical response: your heart rate variability drops, your muscles tense, and your nervous system stays in a low-grade alert mode that directly blocks sleep onset.
Stress is the engine behind most of this. When you’re under pressure, your body produces more cortisol, a hormone that keeps you awake and alert. Research tracking people’s cortisol levels and sleep over 15 consecutive nights found that on days when someone’s pre-sleep cortisol was higher than their personal average, they took significantly longer to fall asleep, slept fewer total hours, and had lower sleep efficiency overall. This wasn’t about being a “stressed person” in general. It was night by night: more stress hormones that evening meant worse sleep that same night.
The cruel irony is that not sleeping creates its own stress. You start worrying about not sleeping, which raises cortisol further, which makes it even harder to fall asleep. Breaking this cycle usually requires addressing the stress itself, not just the sleep.
Screens Are Suppressing Your Sleep Hormone
Your body relies on melatonin to signal that it’s time for sleep, and light is the main switch that controls melatonin production. Specifically, blue light in the 446 to 477 nanometer wavelength range, exactly the kind emitted by phones, tablets, laptops, and LED lighting, suppresses melatonin in a dose-dependent way. The more blue light hits your eyes, the less melatonin your brain produces, and the relationship is almost perfectly linear.
This doesn’t mean glancing at your phone for 10 seconds will ruin your night. But scrolling in bed for 30 to 60 minutes exposes your eyes to enough blue light to meaningfully delay your body’s sleep signal. If you’ve noticed that you feel tired on the couch but wide awake once you get into bed with your phone, this is likely why.
Caffeine Lasts Longer Than You Think
Caffeine has a half-life that ranges from 2 to 10 hours depending on your genetics, age, liver function, and whether you’re taking certain medications. For the average person, it’s roughly 5 to 6 hours. That means if you drink a cup of coffee at 3 PM, about half the caffeine is still circulating in your bloodstream at 9 PM.
Even when caffeine doesn’t stop you from falling asleep, it changes the structure of your sleep. It pushes your deepest sleep stages toward the end of the night and shortens your total sleep time. People who habitually drink large amounts of caffeine (400 mg per day or more, roughly four cups of coffee) show reduced sleep depth even when they feel like they’ve adapted. Lower-consumption individuals are hit even harder when they increase their intake. If you can’t sleep and you’re drinking caffeine after noon, that’s the first thing to change.
Your Bedroom Might Be Too Warm
Your body needs to drop its core temperature by about one degree to initiate sleep, and a warm room fights that process. Sleep researchers have found that optimal room temperature for sleep falls between 19 and 21°C (roughly 66 to 70°F). At these temperatures, your body can establish a skin microclimate between 31 and 35°C under the covers, which is the sweet spot for falling and staying asleep. Deviating from that range in either direction disrupts sleep quality.
If your bedroom is 75°F or warmer, your body has to work harder to cool down, and that effort alone can keep you awake. A cooler room, lighter blankets, or even a warm shower before bed (which paradoxically helps your core temperature drop faster afterward) can make a noticeable difference.
Alcohol Disrupts the Second Half of Your Night
Alcohol is deceptive because it genuinely does help you fall asleep faster. The problem is what happens next. As your body metabolizes alcohol through the night, blood alcohol levels drop, and your sleep falls apart in the second half. You wake up more frequently, spend more time in light sleep, and lose the restorative deeper stages your brain needs.
This creates a particularly vicious pattern. You drink to fall asleep, sleep poorly, feel exhausted the next day, use caffeine to compensate, and then the caffeine makes it harder to sleep the next night, so you drink again. If you regularly have a drink or two before bed and find yourself waking at 2 or 3 AM unable to get back to sleep, alcohol is a likely culprit.
Age Changes Your Sleep Architecture
If you used to sleep well and now you don’t, age may be a factor. The amount of deep sleep (the most physically restorative stage) decreases by about 2% per decade up to age 60. A 50-year-old simply gets less deep sleep than they did at 30, even if nothing else has changed. This doesn’t mean poor sleep is inevitable as you age, but it does mean the margin for error shrinks. Habits that didn’t affect your sleep in your twenties, like late caffeine or an inconsistent schedule, may start causing problems in your forties.
A Medical Condition You Don’t Know About
Obstructive sleep apnea affects nearly 30 million Americans, and an estimated 80% of those cases remain undiagnosed. Sleep apnea causes your airway to partially or fully collapse during sleep, leading to brief awakenings throughout the night. Many people with sleep apnea don’t realize they’re waking up dozens of times per hour. They just know they feel exhausted despite spending enough time in bed. Loud snoring, gasping during sleep (often noticed by a partner), and persistent daytime fatigue are the hallmark signs.
Other medical causes include restless legs syndrome (an uncomfortable urge to move your legs that worsens at night), thyroid disorders, chronic pain, and acid reflux that gets worse when you lie down. If you’ve addressed all the behavioral factors and still can’t sleep, an undiagnosed medical condition becomes more likely.
When Sleeplessness Becomes Insomnia
Everyone has bad nights. But if you’re having trouble sleeping at least three nights per week and it’s been going on for three months or more, that meets the clinical threshold for insomnia disorder. At that point, the problem has likely become self-sustaining. Your bed has become associated with wakefulness and frustration rather than sleep, and simply “trying harder” tends to make things worse.
The most effective treatment for chronic insomnia isn’t medication. It’s a structured approach called cognitive behavioral therapy for insomnia, which works by retraining your brain’s association between bed and sleep. It involves techniques like restricting your time in bed to match the hours you’re actually sleeping, then gradually expanding that window as your sleep improves. It sounds counterintuitive, but it works for most people within a few weeks.
Low Magnesium and Sleep Quality
Magnesium plays a role in nervous system regulation, and low levels are linked to poorer sleep. One clinical trial found that supplementing with 500 mg of elemental magnesium daily for eight weeks significantly increased sleep duration and decreased the time it took to fall asleep in older adults. Magnesium-rich foods include dark leafy greens, nuts, seeds, and legumes. Many people don’t get enough through diet alone, particularly those who eat a lot of processed food or drink alcohol regularly, both of which deplete magnesium stores.
What to Try First
If you’re struggling to sleep, the highest-impact changes are usually the simplest ones. Stop caffeine after noon. Put your phone outside the bedroom (or at least switch to a dim red-toned screen) an hour before bed. Cool your room to around 67°F. Cut back on alcohol, especially within three hours of bedtime. Go to bed and wake up at the same time every day, including weekends.
If none of that helps after two to three weeks of consistent effort, the issue is more likely physiological or psychological, and it’s worth getting evaluated for sleep apnea, anxiety, or other conditions that quietly sabotage sleep from the inside.