Most insomnia responds well to a combination of behavioral changes and environment adjustments, not medication. Around 7 to 8 out of 10 people who use structured behavioral therapy for insomnia see significant improvement in their sleep. Whether you’ve been struggling for a few weeks or a few years, the strategies below are the same ones used in clinical settings, and most of them cost nothing.
What Counts as Insomnia
Everyone has a bad night now and then. Insomnia becomes a clinical problem when you have trouble falling asleep, staying asleep, or waking too early at least three nights per week for three months or longer, and it’s affecting how you feel or function during the day. If that sounds like you, what you’re dealing with isn’t just stress or a rough patch. It’s a pattern your brain has learned, and it can be unlearned.
Untreated insomnia isn’t just about feeling tired. Over time it raises levels of the stress hormone cortisol, increases blood pressure and inflammation, and raises the risk of cardiovascular disease, diabetes, anxiety, and depression. Getting your sleep back on track has downstream effects on nearly every system in your body.
Retrain Your Brain With Behavioral Techniques
Cognitive Behavioral Therapy for Insomnia (CBT-I) is the most effective long-term treatment for insomnia, outperforming sleep medications in studies that follow people for months or years after treatment ends. The core idea: insomnia is maintained by habits and thought patterns that keep your brain in a hyperaroused state around bedtime. Change those patterns, and sleep returns. You can work through CBT-I with a therapist, through online programs, or by applying its key components yourself.
Stimulus Control
Your bed should be so strongly associated with sleep that getting into it makes you drowsy almost automatically. For most people with insomnia, the opposite has happened. The bed has become a place for tossing, worrying, and watching the clock. Stimulus control reverses that association with a few strict rules:
- Go to bed only when you feel sleepy, not just tired. Sleepy means your eyelids are heavy and you’re struggling to stay awake.
- If you can’t fall asleep, get up. Whether it’s at the start of the night or 3 a.m., leave the bedroom and do something quiet and boring in low light. Return only when you feel sleepy again.
- Set a fixed wake time every morning, including weekends. This anchors your circadian rhythm more than any other single habit.
- Don’t use the bed for anything except sleep and sex. No reading, no scrolling, no TV.
This feels counterintuitive at first. Getting out of bed when you’re already exhausted seems like it would make things worse. But the goal isn’t to maximize time in bed. It’s to make every minute in bed count, so your brain relearns that bed equals sleep.
Sleep Restriction
If you’re spending nine hours in bed but only sleeping five, your sleep is spread thin across too many hours. Sleep restriction compresses your time in bed to match how much you’re actually sleeping. Start by tracking your sleep for a week and calculating the average. If you’re averaging six hours, you only allow yourself a six-hour sleep window. The minimum window is 5.5 hours, even if you’re sleeping less than that.
Pick a fixed wake time (say, 6:30 a.m.) and count backward to set your bedtime (12:30 a.m. in this example). For the first week or two, you’ll likely feel more tired during the day. That’s the point. You’re building up enough sleep pressure that when you do go to bed, you fall asleep quickly and stay asleep. Once you’re sleeping through most of your window (roughly 85% or more of the time in bed), you extend the window by 15 to 30 minutes and repeat.
Fix Your Sleep Environment
A cool, dark, quiet room sets the stage for everything else to work. Your body needs to drop its core temperature slightly to initiate sleep, and a warm room fights that process. Keep your bedroom between 60 and 67°F (15 to 19°C). If you tend to run hot, lighter bedding or a fan can make a noticeable difference.
Light matters more than most people realize. Even dim light from a hallway or a charging indicator on a device can interfere with your brain’s production of melatonin, the hormone that signals nighttime to your body. Blackout curtains or a sleep mask are simple fixes. For noise, a white noise machine or earplugs can help if you live somewhere with unpredictable sounds.
Build an Evening Routine That Works
Your body doesn’t have an on/off switch. It needs a wind-down period, and screen time works directly against that process. Blue light from phones, tablets, and computers suppresses melatonin production more powerfully than other types of light. Harvard Health recommends avoiding bright screens two to three hours before bed. If that feels unrealistic, start with one hour and use your device’s night mode or warm-toned settings.
What you do instead matters. The goal is activities that are mildly engaging but not stimulating: light reading (a physical book, ideally), gentle stretching, a warm shower or bath, journaling. A warm bath works especially well because the rapid cooling afterward mimics the temperature drop your body needs for sleep onset. Try to keep your routine consistent. Doing the same things in the same order each night creates a behavioral cue that tells your brain it’s time to wind down.
What to Do During the Day
Sleep quality is shaped by what happens during waking hours, not just the hour before bed. Morning sunlight exposure is one of the most reliable ways to strengthen your circadian rhythm. Within the first hour of waking, spend 10 to 20 minutes in natural light, even on cloudy days. This tells your brain’s internal clock that daytime has started, which makes the signal for nighttime stronger later.
Exercise helps, but timing matters. Regular physical activity improves sleep quality consistently across studies. Intense exercise close to bedtime (within two to three hours) can be stimulating for some people, so earlier in the day is generally better. Caffeine has a half-life of about five to six hours, meaning half the caffeine from your 2 p.m. coffee is still circulating at 7 or 8 p.m. If you’re struggling with insomnia, cut off caffeine by noon and see if it makes a difference over a week or two.
Alcohol is deceptive. It might help you fall asleep faster, but it fragments sleep in the second half of the night, reducing the restorative deep sleep stages. Even moderate drinking in the evening reliably worsens sleep quality.
Where Supplements Fit In
Melatonin is the most widely used sleep supplement, but the evidence is more modest than most people expect. In a meta-analysis of clinical trials, melatonin reduced the time it took to fall asleep by about 7 minutes compared to a placebo. That’s a real effect, but it’s small. Melatonin works best for circadian rhythm issues, like jet lag or a delayed sleep schedule, rather than as a general sleep aid. If you want to try it, low doses (0.5 to 1 mg) taken a few hours before your target bedtime are typically more effective than the higher doses commonly sold.
Magnesium glycinate has gained popularity as a sleep aid, and clinical trials are actively studying it for primary insomnia at doses around 500 mg taken at night. Early interest is promising, but robust evidence is still limited. It’s generally well-tolerated and unlikely to cause harm, which puts it in the “worth trying” category for many people, though it’s no substitute for the behavioral strategies above.
When Insomnia Doesn’t Respond
If you’ve consistently applied these techniques for four to six weeks and you’re still struggling, it’s worth looking deeper. Sleep apnea, restless legs syndrome, thyroid disorders, chronic pain, and certain medications can all cause or worsen insomnia. A sleep study or evaluation can rule out these underlying causes. Depression and anxiety also have a bidirectional relationship with insomnia: each one feeds the other, and treating one often improves both.
For people who need additional help, working with a trained CBT-I therapist (in person or through a validated online program) provides structure and accountability that self-directed efforts sometimes lack. The success rates for guided CBT-I, with 7 to 8 out of 10 people improving significantly, reflect that more structured approach. The effects are long-lasting, which is what sets behavioral treatment apart from medication. Sleep pills tend to stop working when you stop taking them. The skills from CBT-I stay with you.