Poor sleep quality usually comes down to a handful of fixable causes: your bedroom environment, what you consume in the hours before bed, irregular sleep timing, stress levels, or an undiagnosed sleep disorder. Sometimes it’s several of these layered on top of each other. The good news is that most of them are within your control once you know what to look for.
What “Quality” Sleep Actually Means
Sleep isn’t a single state. Your brain cycles through distinct stages throughout the night, and each one serves a different purpose. In a healthy adult, roughly 50% of the night is spent in light sleep, 20% in deep sleep (the physically restorative stage), and 25% in REM sleep (critical for memory, learning, and emotional regulation). The remaining 5% is the brief transitional phase as you drift off, which is closely tied to how refreshed you feel in the morning.
When something disrupts the balance of these stages, you can spend seven or eight hours in bed and still wake up feeling terrible. Deep sleep tends to concentrate in the first half of the night, while REM sleep dominates the second half. That pattern matters because many of the common sleep disruptors listed below selectively damage one half of the night more than the other.
Your Room Is Too Warm
Your body needs to drop its core temperature to initiate and maintain sleep, particularly during REM. The ideal bedroom temperature is 60 to 67°F (15 to 19°C). Anything above 70°F can actively destabilize REM sleep, which means you lose the stage most responsible for feeling mentally sharp the next day. If you’re waking up sweaty or kicking off covers in the middle of the night, temperature is a likely culprit. A fan, lighter bedding, or simply turning the thermostat down before bed can make a measurable difference.
Screens and Light Exposure Before Bed
Your brain uses light, especially blue light in the 446 to 477 nanometer range, as its primary signal for “it’s daytime, stay awake.” Exposure to bright light at night suppresses melatonin, the hormone that initiates sleepiness. Just one hour of 1,000 lux exposure at night (roughly the brightness of a well-lit office) is enough to drop melatonin to daytime levels. Your phone screen doesn’t reach that intensity, but chronic exposure to even low-intensity blue light directly before bedtime can shift your internal clock and delay sleep onset.
The practical fix is straightforward: dim your lights in the hour or two before bed, and if you use screens, enable a warm-toned night mode. The goal isn’t perfection. It’s reducing the total amount of short-wavelength light hitting your eyes in the window before sleep.
Caffeine Lasts Longer Than You Think
Caffeine’s half-life in healthy adults varies widely, anywhere from 4 to 11 hours depending on your genetics and liver metabolism. That afternoon coffee at 3 p.m. could still have half its stimulant effect circulating at 9 p.m. or later. A study in the Journal of Clinical Sleep Medicine found that caffeine consumed six hours before bedtime still had significant disruptive effects on total sleep time, and roughly doubled the time it took participants to fall asleep. The minimum recommendation is to stop caffeine at least six hours before bed, but if you’re a slow metabolizer, you may need a longer buffer.
Alcohol Wrecks the Second Half of Your Night
Alcohol is deceptive. It genuinely does help you fall asleep faster because it’s a sedative. But the trade-off is brutal. In the first half of the night, alcohol pushes your brain into more deep sleep while suppressing REM. That sounds fine until the second half, when the pattern reverses: deep sleep drops, you spend more time awake, and your sleep efficiency tanks. The result is a night that starts well and falls apart, leaving you groggy and unrested despite logging plenty of hours in bed.
This isn’t a dose-dependent subtlety. Studies show these effects at blood alcohol levels around 0.08%, which is roughly three to four standard drinks for most people. Even moderate drinking in the evening can fragment your sleep architecture enough to notice the next morning.
Stress and the Cortisol Problem
In a healthy pattern, your stress hormone cortisol peaks in the morning and drops to its lowest point at night, making way for melatonin. Chronic stress, anxiety, or simply ruminating in bed flips this pattern. Elevated cortisol at night directly suppresses melatonin, delaying sleep onset and increasing the frequency of nighttime awakenings. This creates a frustrating loop: poor sleep raises cortisol the next day, which makes the following night’s sleep worse.
If you find yourself lying awake with a racing mind, the problem isn’t just psychological. There’s a hormonal mechanism actively keeping your brain in a wakeful state. Techniques that lower physiological arousal, like slow breathing, progressive muscle relaxation, or keeping a brief worry journal before bed, can help interrupt the cycle by bringing cortisol levels down before you try to sleep.
Inconsistent Sleep Timing
Sleeping in on weekends feels restorative, but shifting your sleep schedule by even an hour or two creates what researchers call social jetlag. Your internal clock expects consistency. When your Friday and Saturday bedtimes drift later and your wake times shift by two or three hours, you’re essentially giving yourself a mild version of jet lag every Monday morning. Epidemiological studies have linked social jetlag to increased rates of depression, cardiovascular risk, and metabolic dysfunction.
There’s a nuance here, though. If you’re sleep-deprived during the week, sleeping in on weekends does appear to offer some protective benefit, and restricting weekend sleep in that scenario may actually be worse. The real fix is narrowing the gap: keeping your weekday and weekend schedules within about 30 to 60 minutes of each other, ideally by going to bed earlier on weeknights rather than waking up earlier on weekends.
Exercise Timing
Regular exercise improves sleep quality overall, but timing matters. High-intensity workouts like interval training within one hour of bedtime have been shown to delay sleep onset and reduce sleep quality. Your heart rate, core temperature, and adrenaline levels all need time to come back down before your body is ready for sleep. A general guideline is to finish vigorous exercise at least two hours before bed. Lighter activity like stretching or walking doesn’t carry the same risk.
Sleep Apnea: The Hidden Cause
If you’ve optimized your habits and environment and still wake up exhausted, obstructive sleep apnea is worth investigating. OSA causes your airway to partially or fully collapse during sleep, triggering brief awakenings you often don’t remember. Mild cases involve 5 to 15 of these breathing interruptions per hour; moderate cases hit 15 to 30 per hour; severe cases exceed 30. Each event pulls you out of deeper sleep stages, even if you never fully wake up.
Common signs include loud snoring, gasping during sleep (often noticed by a partner), morning headaches, and excessive daytime sleepiness despite adequate time in bed. OSA is significantly underdiagnosed, especially in women and younger adults who don’t fit the stereotypical profile. A sleep study, which can now be done at home in many cases, is the only way to confirm or rule it out.
Low Magnesium Levels
Magnesium plays a role in nervous system relaxation and sleep regulation. Studies comparing good and poor sleepers have found that poor sleepers tend to have meaningfully lower magnesium levels, even when both groups fall within the normal lab range. In one randomized controlled trial, elderly participants with insomnia who took magnesium supplements showed improved sleep quality compared to a placebo group. Calcium levels show a similar pattern, with lower levels correlating to worse sleep scores.
This doesn’t mean magnesium is a cure-all, but if your diet is low in magnesium-rich foods (leafy greens, nuts, seeds, legumes), it’s a reasonable factor to address.
What Your Sleep Tracker Can and Can’t Tell You
If you’re using a wearable to monitor your sleep, the data is useful but imperfect. Consumer devices like the Oura Ring, Fitbit, and Apple Watch are excellent at detecting whether you’re asleep or awake, with accuracy above 95%. But when it comes to identifying specific sleep stages, accuracy drops substantially. The Oura Ring correctly identifies deep sleep about 77% of the time. The Fitbit gets deep sleep right only about 62% of the time. The Apple Watch is even less reliable for deep sleep, at roughly 50%.
This means your device is good for tracking trends over time, like whether your total sleep is improving or your wake-ups are decreasing. But obsessing over a single night’s REM percentage isn’t productive, because the number your device shows could easily be off. Use the trends, not the nightly snapshots.

