Poor sleep usually comes down to one or a combination of fixable factors: your stress levels, your evening habits, your bedroom setup, or an undiagnosed sleep disorder. Most people who search this question aren’t dealing with a rare condition. They’re dealing with a body that’s getting the wrong signals at the wrong time. Adults need 7 to 9 hours of sleep per night, but duration alone doesn’t explain why you wake up feeling unrested. What happens in the hours before bed, and what’s happening in your body while you’re asleep, matters just as much.
Stress Is Keeping Your Brain in Alert Mode
Stress is the most common reason people lie awake at night, and it works through a specific mechanism. Your body’s main stress hormone, cortisol, has alerting and activating properties that promote wakefulness. Normally, cortisol peaks in the morning and drops to low levels in the evening, which allows your brain to transition into sleep. But chronic stress, anxiety, or even just a racing mind can keep cortisol elevated into the evening and early part of the night. When that happens, your body is essentially running a daytime alertness program at the exact moment it should be winding down.
This isn’t just about feeling “wired.” Elevated nighttime cortisol changes the structure of your sleep by causing more frequent awakenings and making it harder to stay in deep, restorative stages. If you notice that you fall asleep fine but wake up repeatedly, or that your mind starts spinning the moment your head hits the pillow, stress hormones are a likely culprit.
Screens and Light Are Delaying Your Sleep Hormone
Your body uses light as its primary cue for when to feel awake and when to feel sleepy. Specialized cells in your eyes are most sensitive to blue light at around 480 nanometers, which is exactly the wavelength emitted by phones, tablets, and laptop screens. When these cells detect blue light in the evening, they send a signal that suppresses melatonin, the hormone that tells your brain it’s time to sleep.
The effect is not subtle. In one study, participants who used a blue-enriched eReader before bed experienced a 55% reduction in evening melatonin levels and a delay of over 1.5 hours in when melatonin production kicked in. That means even if you get into bed at 10 p.m., your brain may not be chemically ready for sleep until 11:30. Blue light exposure before sleep has also been linked to increases in stress hormones, compounding the problem by both suppressing the sleep signal and boosting the wake signal at the same time.
The fix is straightforward: dim your lights and put screens away in the hour or two before bed. Night mode filters help somewhat, but they don’t eliminate the effect.
Alcohol Fragments Your Sleep
A drink or two in the evening might make you feel drowsy, but alcohol is one of the most disruptive substances for sleep quality. It suppresses REM sleep, the stage most associated with memory consolidation, emotional processing, and feeling mentally refreshed. During the first half of the night, alcohol acts as a sedative. But as your body metabolizes it in the second half, you experience a rebound effect: more awakenings, lighter sleep, and sometimes vivid or anxious dreams.
This is why you can sleep for a full eight hours after drinking and still feel terrible the next day. You got the hours but not the architecture your brain needed. Notably, research from the American Academy of Sleep Medicine suggests that long-term heavy drinking can cause potentially permanent changes to the brain’s REM regulation systems, meaning the damage to sleep quality can persist even during sobriety.
Your Bedroom Might Be Working Against You
Temperature plays a bigger role in sleep quality than most people realize. Your core body temperature needs to drop slightly to initiate and maintain sleep, and a warm room makes that harder. Sleep experts recommend keeping your bedroom between 60 and 67°F (15 to 19°C). If your room is warmer than that, you’re more likely to toss, wake up sweating, or struggle to fall asleep in the first place.
Noise and light matter too, but temperature is the factor people most often overlook. If you’ve been sleeping with the thermostat at 72°F or bundled under heavy blankets, try cooling your room down and see what happens over a few nights.
Your Schedule Is Giving You Social Jet Lag
If you sleep from midnight to 8 a.m. on weekends but 11 p.m. to 6 a.m. on workdays, you’re shifting your internal clock back and forth every week. Researchers call this “social jet lag,” measured by the difference between your sleep midpoint on weekdays versus weekends. It creates the same groggy, out-of-sync feeling as crossing time zones.
Social jet lag is associated with worse mood, daytime fatigue, and poorer overall health. Each hour of difference between your weekday and weekend sleep midpoint is linked to an 11% increase in the likelihood of heart disease. The solution isn’t sleeping less on weekends. It’s moving your weekday and weekend schedules closer together, even by 30 to 45 minutes, so your body isn’t constantly readjusting.
Late Exercise Raises Your Resting Heart Rate
Exercise is one of the best things you can do for long-term sleep quality, but timing matters. A study published in Nature Communications found that exercising within four hours of bedtime was linked to falling asleep later, getting less total sleep, and having a higher resting heart rate and lower heart rate variability during the night. Vigorous exercise raises your core temperature and activates your nervous system, both of which work against the cool, calm state your body needs for sleep onset.
If evening is your only option, stick to brief, low-intensity activities like a light jog or easy swim. Ideally, finish any vigorous workout at least four hours before you plan to be in bed.
You May Be Low in Magnesium
Magnesium plays a direct role in sleep regulation. It activates GABA receptors (the brain’s main calming system) and blocks excitatory signals that keep neurons firing. When magnesium levels are low, your nervous system has a harder time downshifting into sleep mode, particularly into deep slow-wave sleep, the most physically restorative stage.
Many adults don’t get enough magnesium from their diet, especially if they eat few leafy greens, nuts, or whole grains. Clinical trials have used 300 milligrams of supplemental magnesium daily to study its effects on sleep in older adults. If you suspect a deficiency, increasing magnesium-rich foods or trying a supplement is a low-risk starting point.
Sleep Apnea: The Hidden Cause
If you’re sleeping enough hours but still waking up exhausted, with a dry mouth, morning headaches, or a partner who says you snore heavily, obstructive sleep apnea could be the cause. This condition involves repeated pauses in breathing during sleep, sometimes dozens of times per hour, each one briefly pulling you out of deep sleep without fully waking you. Most people with sleep apnea don’t know they have it.
Severity is measured by how many breathing interruptions occur per hour of sleep. Fewer than 5 is normal. Between 5 and 15 is considered mild, 15 to 30 is moderate, and 30 or more is severe. Risk factors include excess weight, a larger neck circumference, being over 40, and nasal obstruction. A sleep study, which can now often be done at home, is the standard way to diagnose it. Treatment typically involves a device that keeps your airway open during sleep, and most people notice a dramatic improvement in energy and mental clarity within the first few weeks.