Skip to content
The Library · $99

Sleep aids in pregnancy: melatonin, antihistamines and better nights

Lying awake at 3 a.m. while everyone tells you to "sleep while you can" is exhausting. Here is what is known about sleep aids, and what actually helps.

Updated October 28, 2026 · sources checked October 13, 2026 · Editorial: The Mamavela team

A light nursery with a white cot and an armchair
Photo: Paintzen, Flickr, CC BY 2.0

In short

Melatonin supplements have not been well studied in pregnancy: the few human studies have not suggested birth defects, but MotherToBaby and the NIH say safety is not established. Some antihistamine sleep aids have been used in pregnancy, yet studies do not all agree. The first-line approach is drug-free: sleep habits and cognitive behavioral therapy for insomnia. Ask your OB-GYN or midwife before taking any sleep aid.

Why sleep gets harder

The NHS lists the usual culprits: hormones and tiredness in the first 12 weeks, then a growing bump, needing the loo at night, and vivid dreams about the baby or the birth. Heartburn and restless legs can add to it. The NHS notes that restless legs syndrome can be linked to pregnancy and usually goes away after giving birth, and that it is sometimes linked to low iron, which your team can check.

Position matters too: from 28 weeks the advice is to go to sleep on your side. That is covered in detail in our sleeping positions guide, so this page focuses on what helps you fall and stay asleep.

Sleep aids at a glance

OptionWhat official sources sayAsk first?
Melatonin supplementsNot well studied in pregnancy; the few human studies have not suggested birth defects (MotherToBaby). Lack of safety research (NIH).Yes
Diphenhydramine (antihistamine in many "PM" and sleep products)Studies in early pregnancy do not all agree, with no consistent pattern of birth defects; reports of contractions in late pregnancy mostly involved more than the recommended amount or longer use (MotherToBaby).Yes
Combination "PM" painkillersContain a painkiller as well as an antihistamine; see our pain relief guide for which painkillers to avoid.Yes
Herbal sleep teasLittle research; the NHS advises no more than 4 cups of herbal tea a day and no liquorice root. See our herbal tea guide.If used daily
Prescription sleeping pillsRarely prescribed, short term only, when insomnia is severe and other treatments have failed (NHS).Prescribed only
CBT for insomniaOffered by GPs for insomnia (NHS); tested in pregnancy with good results (see below).No
Alcohol "to help sleep"No known safe amount in pregnancy. See our caffeine and alcohol guide.Avoid

Melatonin: what is known

Melatonin is a hormone your body makes in the dark to regulate sleep. MotherToBaby explains that the body typically makes more of it during pregnancy, with levels highest in the third trimester. Supplements are a different matter: in the US, melatonin is sold as a dietary supplement, which the NIH says is regulated less strictly than medicines, and it reports that in a 2017 test of 31 melatonin supplements, the amount in most products did not match the label.

A 2022 review of human studies found 8 on melatonin in pregnancy, and no randomized trials of melatonin as a treatment for insomnia in pregnancy. The authors concluded melatonin is probably safe but that proper clinical studies are still needed. MotherToBaby's general position is that supplements are not recommended in pregnancy unless your provider has advised them for a medical reason.

Antihistamine sleep aids: what is known

Many over-the-counter sleep aids contain an older antihistamine such as diphenhydramine. MotherToBaby says a few studies suggested a higher chance of birth defects with first-trimester use, but they do not all agree and several found no increase. Occasional use at recommended amounts is not expected to raise the chance of preterm birth or low birth weight. It also warns against combining diphenhydramine with a benzodiazepine sleeping medicine such as temazepam.

If you already take a prescription medicine for pregnancy sickness, check with your pharmacist before adding any sleep aid: one widely used option combines doxylamine, a related antihistamine, with vitamin B6. MotherToBaby says studies of hundreds of thousands of women have looked at that combination.

A bright nursery with a cot, a chest of drawers and a sofa
A bright nursery with a cot, a chest of drawers and a sofa · Photo: Lars Plougmann from London, United Kingdom, CC BY-SA 2.0

What works without tablets

The NHS suggests:

  • relaxing before bedtime, with relaxation or breathing techniques from your midwife or antenatal class;
  • avoiding naps in the afternoon or evening so you are tired at bedtime;
  • no tea, coffee or cola in the evening;
  • staying active: a walk at lunchtime, swimming, or a prenatal yoga class;
  • talking to your partner, a friend, your doctor or midwife if lack of sleep is getting to you.

Cognitive behavioral therapy for insomnia (CBT-I) is a short, structured programme that changes the habits and thoughts that keep you awake. In a US trial of pregnant women with insomnia between 18 and 32 weeks, 64% of those who had CBT-I no longer had insomnia at the end, compared with 52% in a control group, and they improved faster. The NHS says GPs can offer CBT, face to face or as an online self-help programme. In the US, ask your OB-GYN for a referral.

A supportive pregnancy pillow can also make side-sleeping more comfortable.

Printable checklist: a sleep-friendly evening

Is it normal?

Is this normal? Waking several times a night, vivid dreams and feeling tired during the day are very common in pregnancy, especially in the first and third trimesters (NHS). Feeling tired will not harm you or your baby.

For your partner

Take over the late-evening jobs, protect a calm wind-down time, and help set up the pillows. If either of you is struggling with sleep, talk about it rather than coping in silence.

Questions parents ask

Is melatonin safe during pregnancy?

It is not known for certain. MotherToBaby says melatonin supplements have not been well studied in pregnancy and the few human studies have not suggested an increased chance of birth defects. The NIH notes a lack of safety research. Ask your provider before taking it.

Does my body make more melatonin when I am pregnant?

Yes. MotherToBaby says the body typically makes more melatonin in pregnancy, with levels highest in the third trimester, returning to previous levels after delivery.

Can I take an antihistamine sleep aid?

Some people are advised to, occasionally. MotherToBaby says studies on diphenhydramine in early pregnancy do not all agree and show no consistent pattern, and that occasional use at recommended amounts is not expected to cause other pregnancy problems. Check with your OB-GYN or pharmacist first.

Do sleeping pills get prescribed in pregnancy?

Rarely. The NHS says GPs now rarely prescribe sleeping pills for insomnia, and only for a few days or weeks when insomnia is very bad and other treatments have not worked. In pregnancy, your doctor weighs this especially carefully.

Sources

  1. MotherToBaby — Melatonin checked October 13, 2026
  2. NIH NCCIH — Melatonin: What You Need To Know checked October 13, 2026
  3. MotherToBaby — Diphenhydramine checked October 13, 2026
  4. MotherToBaby — Doxylamine succinate-pyridoxine hydrochloride checked October 13, 2026
  5. 988 Suicide & Crisis Lifeline checked October 13, 2026
  6. NHS — Tiredness and sleep problems in pregnancy checked October 13, 2026
  7. NHS — Insomnia checked October 13, 2026
  8. NHS — Restless legs syndrome checked October 13, 2026
  9. Manber R et al. (2019), Obstetrics & Gynecology — Cognitive Behavioral Therapy for Prenatal Insomnia, A Randomized Controlled Trial (PMID 30969203) checked October 13, 2026
  10. Vine T et al. (2022), Brazilian Journal of Psychiatry — Melatonin use during pregnancy and lactation, a scoping review of human studies (PMID 34730672) checked October 13, 2026

Mamavela explains; it does not replace your midwife, doctor or pediatrician, who know your situation. If something worries you, call them. In an emergency, call 911 (US), 999 (UK) or 112.

Read next

Ask Vela