The most effective long-term treatment for insomnia isn’t something you take at all. Cognitive behavioral therapy for insomnia (CBT-I) is the first-line treatment recommended by sleep specialists because it addresses the root causes of poor sleep rather than masking symptoms. That said, several supplements, over-the-counter options, and prescription medications can help, especially when used alongside behavioral changes. What works best depends on whether your insomnia is short-term or chronic, and what’s driving it.
CBT-I: The First-Line Treatment
CBT-I is a structured program, typically lasting six to eight weeks, that retrains your brain’s relationship with sleep. It includes techniques like stimulus control (only using your bed for sleep), sleep restriction (limiting time in bed to match the hours you actually sleep), and cognitive restructuring to quiet the anxious thoughts that keep you awake. Unlike sleeping pills, CBT-I helps you overcome the underlying causes of your sleep problems, which is why its benefits persist long after the program ends.
You can access CBT-I through a therapist, a sleep clinic, or digital programs and apps that guide you through the protocols remotely. It requires more effort upfront than popping a pill, but for chronic insomnia lasting more than three months, it produces better and more durable results than medication alone.
Melatonin
Melatonin is the most popular sleep supplement, and it works best for a specific problem: your body’s internal clock is out of sync. If you struggle to fall asleep at a reasonable hour but sleep fine once you’re out, melatonin can help shift your sleep timing earlier. It’s less effective for people who fall asleep on time but wake repeatedly through the night.
The NHS recommends a starting dose of 2 mg in a slow-release tablet, taken one to two hours before your target bedtime for short-term insomnia. For longer-term use, the dose can gradually increase up to 10 mg if needed, though most people do well at lower amounts. A common mistake is taking too much. Doses above 5 mg don’t improve sleep for most adults and can cause grogginess the next morning.
One important caveat: melatonin supplements are poorly regulated. A study published in the Journal of Clinical Sleep Medicine found that 71% of melatonin supplements contained amounts that were off by more than 10% from what the label claimed. Even within a single bottle, the actual melatonin content varied by as much as 465% between pills. Look for products verified by USP (United States Pharmacopeia) or NSF International, which independently test for accurate labeling.
Magnesium
Magnesium plays a role in calming the nervous system, and many people with poor sleep are mildly deficient without knowing it. Supplementing won’t knock you out the way a sedative would, but it can make it easier to wind down and stay asleep, particularly if your levels are low. The recommended dose for sleep is 250 to 500 mg of elemental magnesium taken at bedtime.
The form matters. Magnesium citrate has the most research supporting its use as a sleep aid, but it also has strong laxative effects that make it impractical for many people. Magnesium glycinate is the form most sleep specialists recommend instead, as it’s well absorbed and gentler on the stomach. Avoid magnesium oxide, which is cheap and widely available but poorly absorbed.
Valerian Root and Other Herbals
Valerian root is one of the oldest herbal sleep remedies, and it remains widely sold. The evidence behind it, however, is inconsistent. Some clinical trials show modest improvements in how quickly people fall asleep, while others show no benefit over placebo. If you try it, allow two to four weeks of nightly use before judging whether it helps, as the effects appear to build gradually rather than working on the first night.
Other herbal options like passionflower, chamomile, and L-theanine (an amino acid found in tea) have limited but promising evidence for mild sleep difficulties. None of these are strong enough to treat moderate or severe insomnia on their own, but they carry minimal side effects and may help as part of a broader sleep routine.
Why Antihistamine Sleep Aids Aren’t a Good Bet
Over-the-counter sleep aids like diphenhydramine (the active ingredient in ZzzQuil, Tylenol PM, and many store-brand sleep tablets) and doxylamine (found in Unisom SleepTabs) are antihistamines that cause drowsiness as a side effect. They can work for an occasional rough night, but they’re a poor choice for ongoing insomnia. Most people develop tolerance very quickly, meaning the same dose stops working after just a few days of consecutive use.
Beyond tolerance, antihistamines reduce sleep quality even when they make you feel drowsy. They suppress the deeper stages of sleep your brain needs for memory and restoration. They also cause next-day grogginess, dry mouth, and constipation. In older adults, regular antihistamine use is linked to increased fall risk and cognitive impairment. These are not designed as sleep medications, and using them as one comes with diminishing returns.
Prescription Sleep Medications
When insomnia is severe and doesn’t respond to behavioral therapy or supplements, prescription options exist. The newer class of sleep medications, called orexin receptor antagonists, works by blocking a brain chemical that promotes wakefulness. Three are currently available: suvorexant, lemborexant, and daridorexant. These tend to cause less next-day impairment and carry a lower risk of dependence compared to older sedatives.
Older prescription options include benzodiazepine-type sedatives and non-benzodiazepine sleep aids (often called “Z-drugs”). These are effective for short-term use but carry risks of tolerance, dependence, and rebound insomnia when stopped. Newer sleep medicines are approved for longer-term use, but sleeping pills generally are not considered the best long-term solution for most people with chronic insomnia.
Building a Sleep Stack That Works
For most people, the best approach combines behavioral changes with targeted supplementation. A practical starting point looks like this:
- Fix the basics first. Keep a consistent wake time (even on weekends), limit caffeine after noon, get bright light exposure in the morning, and keep your bedroom cool and dark.
- Add one supplement at a time. Try melatonin if your problem is falling asleep, or magnesium glycinate if you feel wired or restless at night. Give each supplement at least two weeks before adding something else.
- Consider CBT-I early. If your insomnia has lasted more than a month, a structured CBT-I program will likely help more than any supplement.
- Reserve medication for when you need it. Prescription options work best as a bridge while behavioral strategies take hold, not as a permanent fix.
Insomnia responds best to consistency. Whatever you take or do, the results compound over weeks, not nights. A single supplement rarely solves the problem, but the right combination of habits, timing, and targeted support can shift your sleep patterns significantly within a few weeks.