Several supplements, over-the-counter medications, and prescription options can help you sleep, but they vary widely in effectiveness, safety, and how well they work over time. The best choice depends on whether you struggle to fall asleep, stay asleep, or both. Here’s what actually works, what to watch out for, and what the evidence says about each option.
Melatonin: Best for Falling Asleep
Melatonin is the most popular sleep supplement, and for good reason. Your brain naturally produces it as darkness falls, signaling that it’s time to wind down. Taking a supplement nudges that signal along, which is why melatonin works best when your issue is falling asleep rather than staying asleep.
The effective dose is lower than most people think. Research shows melatonin reaches peak effectiveness between 2 and 4 mg per day, both for shortening the time it takes to fall asleep and for increasing total sleep duration. Many products on shelves contain 5 or 10 mg, which is more than you need and can leave you groggy the next morning. Start with 1 to 3 mg taken 30 to 60 minutes before bed.
One important caveat: supplement labels aren’t always accurate. A study analyzing 31 melatonin products found that the actual melatonin content varied by as much as 465 percent between different batches of the same product. Some contained far more melatonin than listed. If you try melatonin and get inconsistent results, the product itself may be the problem. Look for brands that carry a third-party testing seal from USP or NSF International.
Magnesium Glycinate
Magnesium is involved in hundreds of processes in your body, and several of them directly affect sleep. It dials down excitatory signaling in the brain, supports GABA (your brain’s main calming chemical), helps regulate melatonin production, and lowers nighttime cortisol, the stress hormone that keeps you alert. The glycinate form is particularly useful because glycine itself acts as a calming neurotransmitter that stabilizes electrical activity in the brain and spinal cord.
The recommended dose is 200 to 400 mg of elemental magnesium daily, typically taken in the evening. Most people notice improvements within a few weeks. Magnesium glycinate is gentler on the stomach than other forms like magnesium citrate, which can cause loose stools. It’s a good option if you tend to feel physically tense or wired at bedtime, since it works partly by calming your nervous system’s fight-or-flight response.
L-Theanine
L-theanine is an amino acid found naturally in tea leaves. It promotes relaxation without sedation, making it useful if racing thoughts keep you awake. A systematic review of supplementation studies found that doses between 50 and 655 mg improved sleep quality either on its own or combined with other supplements. Interestingly, doses above 655 mg appeared to be counterproductive and potentially detrimental to sleep quality, so more is not better here.
Most people take 200 to 400 mg about an hour before bed. L-theanine pairs well with magnesium, and some people combine it with a low dose of melatonin. Side effects are minimal, and it doesn’t cause morning grogginess.
Valerian Root
Valerian root has been used as a sleep remedy for centuries, and there is some clinical support for it. A meta-analysis published in The American Journal of Medicine found that people taking valerian were 1.8 times more likely to report improved sleep compared to those on a placebo. That’s a real effect, though the researchers noted signs of publication bias, meaning the true benefit might be somewhat smaller.
Valerian works best after consistent use over two to four weeks rather than as a one-night fix. It has an earthy, somewhat unpleasant smell and taste, so capsules are more practical than teas. Typical doses range from 300 to 600 mg taken 30 minutes to two hours before bed.
Over-the-Counter Antihistamines
Diphenhydramine (the active ingredient in Benadryl and most “PM” products) and doxylamine (found in Unisom SleepTabs) are the two antihistamines sold specifically as sleep aids. They work by blocking histamine, a brain chemical that promotes wakefulness. They’ll likely knock you out the first few nights, but the drowsiness effect fades quickly. As your body adjusts, you lose the sleep benefit but keep the side effects.
Those side effects include next-day attention problems, impaired driving ability, and a general cognitive fog that can linger well into the morning. These drugs have anticholinergic properties, meaning they block a neurotransmitter called acetylcholine that’s critical for memory and cognition. A large study tracking nearly 3,500 older adults found that long-term anticholinergic use was associated with a 54 percent higher risk of dementia compared to minimal use. The risk increased with cumulative dose, meaning the more you took over time, the greater the association. This doesn’t definitively prove causation, but it’s concerning enough that these medications should not be a nightly habit.
If you use diphenhydramine or doxylamine, treat them as occasional tools for a rough night, not a long-term solution.
Prescription Options
If over-the-counter options aren’t enough, a newer class of prescription sleep medications works differently from the sedatives most people picture. These drugs block orexin, a brain chemical that promotes wakefulness. Instead of forcing your brain into a sedated state the way older sleep medications do, they quiet the arousal system and let sleep happen more naturally.
The practical advantage is meaningful. Traditional prescription sleep medications often alter the balance between sleep stages, reducing the deep, restorative phases and contributing to next-day drowsiness. Orexin-blocking medications preserve the normal proportions of REM and non-REM sleep, which translates to better sleep quality and less morning impairment. They help with both falling asleep and staying asleep, making them useful for people who wake up repeatedly during the night.
CBN and CBD
Cannabinol (CBN) is increasingly marketed as a sleep cannabinoid, but the evidence is still thin. A clinical trial is currently testing CBN at doses of 30 mg and 300 mg in adults with chronic insomnia to measure its effects on sleep stages and next-day functioning, but results aren’t yet available. CBD has more research behind it for anxiety, which can indirectly help sleep, but neither cannabinoid has the kind of robust clinical evidence that melatonin or prescription options do. If you try them, treat the results as personal experimentation rather than something backed by strong science.
Why Therapy Outperforms Medication Long-Term
Cognitive behavioral therapy for insomnia, known as CBT-I, is the most effective long-term treatment for sleep problems. It’s a structured program, usually lasting four to eight weeks, that retrains your sleep habits and thought patterns. You learn techniques like stimulus control (only using your bed for sleep), sleep restriction (temporarily limiting time in bed to build stronger sleep drive), and strategies for managing the anxiety that often fuels insomnia.
A head-to-head study comparing CBT-I against a common prescription sleep medication found that the therapy group showed greater improvements in both how quickly they fell asleep and their overall sleep efficiency. Adding medication to therapy provided no additional benefit beyond therapy alone. Most telling: participants who took only the medication returned to their original poor sleep patterns once they stopped. The therapy group maintained their improvements at long-term follow-up.
CBT-I is available through therapists, sleep clinics, and several app-based programs. It requires more effort upfront than swallowing a pill, but it addresses the root cause of insomnia rather than masking it.
Putting It All Together
For occasional sleeplessness, low-dose melatonin (2 to 3 mg) or magnesium glycinate (200 to 400 mg) are reasonable first steps with minimal downsides. L-theanine is a good add-on if a busy mind is the main problem. Valerian root is worth trying if you prefer herbals, but give it a few weeks to take effect.
Avoid making antihistamines a regular habit. If you need help more than two or three nights a week, that points to a pattern worth addressing through CBT-I or a conversation with a healthcare provider about newer prescription options. Supplements can smooth the edges, but lasting improvement in sleep almost always comes from changing the behaviors and conditions around your sleep rather than relying on any single pill or capsule.

