Most over-the-counter sleep aids are not automatically off-limits during pregnancy, but the safest first step is a non-medication approach. Sleep troubles affect the majority of pregnant women, and while certain antihistamine-based options have reassuring safety data, other common sleep aids like melatonin and herbal supplements lack enough human evidence to confirm they’re safe for a developing baby.
Antihistamine Sleep Aids Have the Most Safety Data
Doxylamine succinate is the over-the-counter antihistamine with the strongest pregnancy safety record. Studies involving hundreds of thousands of women have found it does not increase the chance of birth defects, preterm delivery, or low birth weight. Follow-up research on children exposed in the womb found no higher rates of behavior or learning problems between ages 2 and 7. In the U.S., doxylamine is one half of the prescription combination sold as Diclegis for morning sickness, but it’s also available on its own as a sleep aid (Unisom SleepTabs).
Diphenhydramine (the active ingredient in Benadryl and ZzzQuil) also has a reassuring safety profile. A large meta-analysis pooling 37 studies found that first-trimester exposure to antihistamines was not associated with a higher risk of major malformations, miscarriage, premature birth, stillbirth, or low birth weight. That said, doxylamine tends to be the preferred choice among providers because of its deeper evidence base specifically in pregnant populations.
Both of these medications can cause next-day grogginess, dry mouth, and constipation, which may be more noticeable during pregnancy when you’re already dealing with similar symptoms. They’re generally considered appropriate for short-term or occasional use rather than a nightly habit.
Melatonin and Herbal Supplements Are Uncertain
Melatonin is widely sold as a “natural” sleep aid, but natural doesn’t mean proven safe during pregnancy. There is currently not enough human data to confirm how supplemental melatonin affects fetal development. Nearly all the available evidence comes from animal studies. One additional concern: melatonin acts as both an antioxidant and a potential pro-oxidant depending on dose and context, meaning taking too much could theoretically shift your body’s balance in unintended ways.
Valerian root, another popular herbal option, sits in the same evidence gap. The National Institutes of Health states plainly that little is known about whether valerian is safe during pregnancy or breastfeeding. Because herbal supplements aren’t regulated the same way as medications, their potency and purity can also vary between products.
The bottom line on supplements: the lack of safety data isn’t the same as proof of harm, but it means no one can tell you with confidence that these are safe for your baby.
Prescription Sleep Medications Carry More Risk
Prescription sedatives like zolpidem (Ambien) have limited reproductive safety data, and the studies that do exist raise concerns. One large study found that women who took zolpidem during pregnancy had higher odds of delivering a low-birth-weight baby (39% increased risk), going into preterm labor (49% increased risk), and needing a cesarean delivery (74% increased risk) compared to women who didn’t take the drug. These are observational findings, so they don’t prove the medication directly caused the outcomes, but they’re significant enough that most providers avoid prescribing zolpidem during pregnancy unless the situation is severe.
For pregnant women with serious insomnia tied to depression or anxiety, a sedating antidepressant may sometimes be considered. Certain older antidepressants have not shown increased risk for major birth defects and can address both the mood disorder and the sleep disruption. Benzodiazepines like lorazepam are reserved for the most severe cases because of potential effects on the newborn, including sedation and feeding difficulties after birth.
Non-Drug Approaches Work Better Than You’d Expect
Sleep hygiene and behavioral therapy are recommended as the first-line treatment for pregnancy insomnia, and not just as a consolation prize while you wait for permission to take something. Cognitive behavioral therapy for insomnia (CBT-I) has been tested specifically in pregnant women and shown to produce meaningful improvements. A meta-analysis of randomized controlled trials found a moderate-to-large reduction in insomnia severity, and the benefits held up at follow-up assessments after treatment ended.
CBT-I works by retraining your sleep habits and thought patterns around sleep. The core techniques include stimulus control (only using your bed for sleep, getting up if you’re awake for more than 15-20 minutes) and structured sleep scheduling. Some programs also incorporate relaxation training. You don’t necessarily need in-person sessions: about 30% of the studies in the meta-analysis delivered the program through emails or digital messages, and the results were comparable to face-to-face formats.
Basic sleep hygiene adjustments also help, especially when combined. Keeping a consistent wake time, limiting screens before bed, sleeping in a cool and dark room, and using a pregnancy pillow to manage physical discomfort are all low-risk strategies that can meaningfully improve sleep quality.
Magnesium May Help as a Middle Ground
Magnesium glycinate is sometimes recommended to support sleep because magnesium plays a role in muscle relaxation and nervous system regulation. Pregnant women have slightly higher magnesium needs, roughly 40 mg more per day than non-pregnant adults. Many women are already mildly deficient, so a supplement may address a genuine nutritional gap while also making it easier to fall asleep. That said, magnesium’s direct effect on insomnia during pregnancy hasn’t been rigorously studied, so it’s more of a reasonable option than a proven treatment.
How Pregnancy Sleep Trouble Changes by Trimester
Sleep problems in the first trimester are often driven by hormonal surges, nausea, and the need to urinate frequently at night. Many women feel exhausted but paradoxically struggle to sleep well. By the second trimester, sleep sometimes improves as nausea fades and energy returns.
The third trimester is when insomnia hits hardest. Physical discomfort from a growing belly, heartburn, restless legs, back pain, and frequent bathroom trips all conspire against a full night’s sleep. This is also when the temptation to reach for a sleep aid peaks. If you’ve been managing without medication and find that third-trimester insomnia is becoming unmanageable, an occasional dose of doxylamine is the option with the most evidence behind it. For persistent insomnia that’s affecting your ability to function, a structured CBT-I program can produce lasting improvements without any medication exposure at all.
The Old Letter Rating System No Longer Applies
If you’ve seen medications labeled as “Category A” or “Category B” for pregnancy safety, that system has been retired. The FDA replaced those letter grades with a more detailed labeling format that includes a risk summary, clinical considerations, and available data for each drug. This means you can no longer simply look for a letter grade to judge safety. Instead, the label describes what’s actually known, which is more useful but also means you’ll likely need to discuss specific medications with your provider rather than relying on a quick category lookup.

