If you’re struggling to fall asleep or stay asleep, the single most effective thing you can do is a structured behavioral program called cognitive behavioral therapy for insomnia, or CBT-I. It works better than sleeping pills for most people and produces lasting results. But there’s a full toolkit of strategies worth knowing about, from simple environmental changes to supplements and, when needed, medication.
How Insomnia Is Defined
Occasional bad nights are normal. Clinical insomnia means difficulty falling asleep, staying asleep, or waking too early, at least three nights per week for three months or longer, despite having adequate opportunity to sleep. It also has to cause real daytime problems: fatigue, trouble concentrating, irritability, or impaired functioning. If that description fits your situation, you’re dealing with something that typically won’t resolve on its own without changes.
CBT-I: The Most Effective Treatment
The American Academy of Sleep Medicine, backed by the World Sleep Society, gives CBT-I its strongest recommendation as the first-line treatment for chronic insomnia in adults. That recommendation applies whether or not you also have depression, anxiety, chronic pain, or another medical condition. This isn’t a vague suggestion to “think positive.” It’s a structured program, usually five to eight sessions, that rewires the habits and thought patterns keeping you awake.
CBT-I combines several techniques. Sleep restriction limits the time you spend in bed to match the time you actually sleep, which builds up enough sleep pressure to consolidate your rest into a solid block. Stimulus control retrains your brain to associate the bed with sleep rather than with lying awake and worrying. Relaxation training and cognitive restructuring address the racing thoughts and anxiety that fuel the cycle. A recent telehealth study of group-based CBT-I found that participants improved their sleep quality scores dramatically, with about 63% achieving a clinically meaningful reduction in insomnia severity. Sleep efficiency, the percentage of time in bed actually spent sleeping, jumped by nearly 11 percentage points.
One of the most striking findings: many participants in that program were able to reduce or stop sleep medications entirely, including sedatives, antihistamines, melatonin, cannabis, and alcohol used for sleep. You can access CBT-I through a sleep psychologist, some primary care practices, or digital programs. If in-person therapy isn’t accessible, app-based versions have shown real results in clinical trials.
Environmental Changes That Actually Help
Sleep hygiene alone isn’t enough to fix chronic insomnia. Clinical guidelines specifically note that sleep hygiene education as a standalone treatment lacks sufficient evidence. But combined with other approaches, the right environment removes obstacles that make falling asleep harder than it needs to be.
Temperature matters more than most people realize. Research supports keeping your bedroom between 17 and 28°C (roughly 63 to 82°F) with humidity around 40 to 60%. A warm shower of about 40°C (104°F) taken 10 to 20 minutes before bed can ease sleep onset. The mechanism is simple: warming your skin dilates blood vessels, which helps your core body temperature drop, and that drop is one of the signals your brain uses to initiate sleep.
Light exposure plays a dual role. Getting bright light in the morning helps anchor your circadian rhythm, suppresses leftover melatonin, and increases daytime alertness. At night, the opposite matters: blue light from phones, tablets, and laptops interferes with melatonin production. Dimming screens or using blue-light filters in the hour before bed reduces that interference.
What to Know About Caffeine and Alcohol
Caffeine has a half-life of about five to six hours, meaning half the caffeine from your 3 p.m. coffee is still active in your system at 8 or 9 p.m. If you’re sensitive, even a midday cup can delay sleep onset. Cutting off caffeine by noon is a reasonable starting point, though some people need to pull that back further.
Alcohol is trickier because it genuinely does help you fall asleep faster. During the first half of the night, it acts as a sedative, increasing deep sleep and suppressing dream sleep. But as your body metabolizes the alcohol during the second half of the night, the effect reverses. Dream sleep rebounds, wakefulness increases, and you cycle between sleep stages more frequently. The result is fragmented, low-quality sleep and those familiar 3 a.m. wake-ups. Even moderate drinking in the evening can produce this pattern.
Over-the-Counter Sleep Aids
The two most common drugstore sleep aids, diphenhydramine and doxylamine, are antihistamines that cause drowsiness as a side effect. They’re not recommended for regular use. Both carry anticholinergic properties, meaning they block a chemical messenger in the nervous system involved in memory, attention, and other functions. With frequent use, the risks include next-day grogginess, dry mouth, constipation, blurred vision, and difficulty emptying your bladder.
More concerning is the long-term picture. Repeated use of these medications is associated with increased dementia risk in older adults, and they’re specifically not recommended for anyone 65 or older. Tolerance also develops relatively quickly, meaning the same dose stops working and you need more to get the same sedating effect. These products are fine for the occasional rough night, but they’re a poor solution for ongoing insomnia.
Melatonin and Magnesium
Melatonin supplements work best for circadian rhythm issues, like jet lag or a sleep schedule that’s shifted too late, rather than for general insomnia. Your body produces melatonin naturally as darkness falls, and a supplement essentially moves that signal earlier. Low doses (0.5 to 3 mg) taken one to two hours before your target bedtime tend to work better than the high doses commonly sold. More is not more effective here, and high doses can cause grogginess or disrupt your natural rhythm.
Magnesium has a supporting role. It’s involved in melatonin production and helps regulate the nervous system’s relaxation response. A dose of 250 to 500 mg at bedtime is the range typically suggested. Magnesium citrate has the most evidence behind it for sleep, though it also has noticeable laxative effects. Magnesium glycinate is a common alternative that’s easier on the stomach. Neither supplement is a cure for insomnia, but if you’re mildly deficient in magnesium (many adults are), correcting that can take the edge off.
Weighted Blankets
Weighted blankets have moved from anecdotal popularity to actual clinical evidence. In a randomized controlled trial, nearly 60% of people using a weighted blanket for four weeks saw their insomnia severity score drop by at least half, compared to just 5.4% in the control group. Remission, meaning insomnia scores fell into the normal range, occurred in 42% of the weighted blanket group versus under 4% of controls. Participants also reported less daytime fatigue, lower depression and anxiety symptoms, and better daytime activity levels. The deep pressure sensation is thought to reduce arousal by calming the nervous system, similar to the effect of a firm hug.
Prescription Medications
When behavioral approaches aren’t enough on their own, a newer class of sleep medications works differently from older options. These drugs block orexin, a brain chemical that promotes wakefulness. Three are currently FDA-approved. Unlike older sedatives that targeted either falling asleep or staying asleep, orexin blockers address both problems. They help you fall asleep and reduce middle-of-the-night awakenings.
Older prescription options include sedatives and certain antidepressants prescribed at low doses for their drowsiness side effect. These carry more baggage: dependence risk, next-day impairment, and rebound insomnia when you stop. Most sleep specialists view medication as a bridge, something to use while CBT-I takes effect, rather than a long-term fix. The goal is almost always to build sustainable sleep habits that hold up without a pill.
Building a Practical Plan
The most effective approach layers these strategies. Start with the behavioral fundamentals: keep a consistent wake time every day (including weekends), get out of bed if you’ve been lying awake for 20 minutes or more, and reserve the bed for sleep only. Add the environmental pieces: cool room, warm pre-bed shower, morning light, screens off an hour before bed. Cut caffeine by noon and limit evening alcohol.
If those changes aren’t enough after two to three weeks, pursue CBT-I through a therapist or a validated digital program. Supplements like magnesium or low-dose melatonin can be reasonable additions, particularly if your schedule is irregular or your diet is low in magnesium-rich foods. Save over-the-counter antihistamines for truly occasional use, and talk to a clinician about prescription options only if structured behavioral treatment hasn’t produced results after a fair trial.