Need a Human Doctor?

We guide you when professional in-person care is required.

Symptom Checker

Why Do My Legs Cramp at Night During Pregnancy?

Leg cramps are common in pregnancy, often at night in the second and third trimesters. The sudden, tight pull in your calf or foot has no single proven cause, and changes in circulation, muscle fatigue, and other pregnancy-related changes may all contribute.

Why Do My Legs Cramp at Night During Pregnancy?
Pregnancy & Women's HealthPregnancy Sleep & Comfortsymptom-check
Written By: DocAi Health Editorial Team
Last Updated: 2026-09-30
Medical Disclaimer: This article is for general informational and educational purposes only and is not medical advice. It does not create a doctor-patient relationship and is not a substitute for professional diagnosis or treatment by a qualified healthcare provider. Never disregard or delay seeking professional medical advice because of something you have read here. If you think you may have a medical emergency, call 911 or your local emergency number right away. Health information can change and this guidance is general and US-focused, so consult a licensed clinician in your own country about your specific situation.
Leg cramps are common in pregnancy, often at night in the second and third trimesters. The sudden, tight pull in your calf or foot has no single proven cause, and changes in circulation, muscle fatigue, and other pregnancy-related changes may all contribute. Most cramps are uncomfortable rather than dangerous, and stretching can help. This article also covers the less common warning signs, like one-sided swelling or pain that will not let up, that can point to a blood clot instead of an ordinary cramp.

What Is Actually Happening in Your Leg

A nighttime leg cramp is a sudden, involuntary tightening of the calf muscle, and sometimes the foot or thigh, that will not release on its own for anywhere from a few seconds to several minutes. Mayo Clinic states that the exact cause of leg cramps during pregnancy is not clear, and researchers have not identified one single cause. Several overlapping factors have been proposed. Your growing uterus can press on the veins that carry blood back up from your legs, which may slow circulation. Carrying extra weight on your legs all day may also leave those muscles more fatigued by bedtime. These are possible contributors rather than proven causes.
Minerals and fluid balance often come up as well. MedlinePlus lists dehydration and low levels of minerals such as sodium, potassium, or calcium among the things that can make a muscle spasm more likely. A 2020 Cochrane review of eight small trials could not say whether magnesium, calcium, or other supplements reduce leg cramps in pregnancy, because the studies were small and reported their results in different ways. Staying well hydrated is a reasonable habit in pregnancy, although dehydration has not been established as a cause of pregnancy leg cramps.
Until more is known about why they happen, the steps in this article are aimed at easing a cramp when it strikes and may reduce how often cramps come back and how much they disturb your sleep.

Why Cramps Often Show Up at Night

Leg cramps in pregnancy often happen at night, and the exact reason for that pattern is not fully understood. During the day you are moving, which keeps blood circulating through your leg muscles. At night, when you lie still for hours, circulation may slow, and a calf that has been working to support extra weight since morning may be more fatigued. Both ideas are plausible, but neither has been proven to explain nighttime cramps. Many pregnant women describe being woken out of a sound sleep by a cramp rather than noticing it while still awake.
Sleep position is a separate question. ACOG advises avoiding sleeping on your back later in pregnancy and says you can sleep on either side, right or left. A pillow between your knees can make side sleeping more comfortable, but this is general pregnancy advice rather than a proven way to prevent leg cramps.

How to Release a Cramp in the Moment

When a cramp hits, straighten your leg and gently pull your toes up toward your shin rather than pointing your foot, which can help stretch and release the cramped muscle. You can do this by hand, by pressing your heel against the floor or a wall while keeping the leg straight, or by standing up and putting your heel down flat with your knee slightly bent. Hold the stretch until the muscle lets go.
Once the sharp cramp eases, a warm compress, a warm shower, or gently massaging the calf may help the muscle relax the rest of the way, and Mayo Clinic notes that walking a short distance and then sitting with your legs raised might help keep a cramp from coming back. Walk only if you can bear weight comfortably. If you cannot, treat that as a reason to call your provider right away rather than as an ordinary cramp, and if pain lingers in the calf long after the cramp has passed, mention it to your provider the same day (see the blood clot section below).

Steps That May Help Prevent Night Cramps

A few habits, kept up consistently, may reduce how often cramps show up. The evidence behind each is limited, so think of them as reasonable comfort measures:
  • Stretch your calves before bed, pulling your toes toward your shin the same way you would to release a cramp. Mayo Clinic says stretching before bed might help prevent leg cramps during pregnancy and describes holding a calf stretch for about 30 seconds.
  • Drink fluids steadily during the day, since pregnancy increases your fluid needs. Mayo Clinic says keeping your muscles hydrated might help prevent cramps.
  • Stay active with movement your provider has cleared, and get up and move for a few minutes every hour or two if your day involves long stretches of sitting or standing still.
  • Ask your prenatal care provider whether a calcium or magnesium supplement makes sense for you. Do not start a new supplement on your own during pregnancy, since the right dose and form depend on what is already in your prenatal vitamin.
  • In the second and third trimesters, consider sleeping on your side rather than your back, on whichever side is comfortable, with a pillow between your knees if it helps.
  • Wear comfortable, supportive shoes during the day. If you are on your feet a lot, ask your provider whether graduated compression stockings make sense for you. They may ease leg swelling or heaviness, but they are not a proven treatment for leg cramps themselves.
No single supplement or treatment reliably prevents pregnancy leg cramps. Stretching, regular movement, adequate nutrition, and comfortable positioning are reasonable measures, but research on specific supplements remains mixed.
If you also feel unusually tired, mention it at your next prenatal visit, since fatigue has many possible causes in pregnancy, including low iron. Our guide to iron needs during pregnancy walks through the numbers, and our guide to exercise in the third trimester covers what is generally considered safe.

Food, Minerals, and Supplements

Eating a varied diet that includes calcium, magnesium, and potassium is part of a healthy pregnancy, and getting them from food alongside your prenatal vitamin is a reasonable first step before considering a separate supplement. Dairy products, fortified plant milks, and vegetables like kale and broccoli are good calcium sources. Mayo Clinic lists whole grains, beans, dried fruits, nuts, and seeds as magnesium-rich foods. Bananas, potatoes with the skin on, oranges, and beans are common potassium sources.
None of this guarantees a cramp-free night, since the cause of pregnancy leg cramps is not fully understood. A varied diet plus the stretching and hydration habits above are reasonable steps that may help, and your provider can tell you whether anything else makes sense for you.

Leg Cramps or Restless Legs Syndrome?

Restless legs syndrome is a different condition that can also flare at night in pregnancy, and it is easy to confuse with cramps at first. Restless legs syndrome causes an uncomfortable, hard to describe urge to move your legs, often described as crawling, tingling, or aching, that comes on when you are lying still and usually eases when you move. A cramp, by contrast, is a sudden, sharp muscle spasm you can usually locate in one exact spot in the calf, and stretching, rather than simply moving around, is what usually releases it.
Restless legs syndrome can occur or worsen in pregnancy, especially in the last trimester, and iron deficiency is particularly relevant to it. If you have restless legs symptoms, or symptoms of iron deficiency such as unusual tiredness, discuss with your prenatal provider whether your iron status should be checked. Restless legs syndrome that disrupts your sleep regularly is also worth mentioning to your provider, since there are pregnancy safe strategies that can help beyond the stretching and hydration steps used for cramps.

Leg Cramp or Blood Clot? How to Tell the Difference

According to the CDC, pregnancy increases the risk of a blood clot fivefold, and the risk stays high through the three months after delivery. A clot in one of the deep veins of the leg is called a deep vein thrombosis, or DVT. Your blood clots more easily during pregnancy, and later on the growing baby presses on blood vessels around the pelvis, which can reduce blood flow to your legs, so a leg symptom that does not fit the usual cramp pattern is worth a second look. Our guide to early signs of a blood clot in the leg covers the warning signs in more detail.
An ordinary cramp is a brief, intense spasm that usually releases with stretching, after which the leg feels normal apart from some lingering soreness. A blood clot can behave differently. The CDC lists swelling of the affected limb, pain or tenderness not caused by injury, and skin that is warm to the touch, red, or discolored as signs of a DVT. In a leg clot these changes often affect one leg, may not go away the way a cramp does, and can keep getting worse instead of easing. The calf may look larger than the other leg, feel warm or tight to the touch, ache or throb even when you are sitting still, and hurt too much to comfortably bear weight on.
These symptoms can suggest a DVT, but symptoms alone cannot confirm or rule one out. The NHLBI notes that clot symptoms are not the same for everyone and that a clot sometimes causes none until serious complications develop. A DVT can also begin with a cramp-like ache in the calf, so a clot cannot be ruled out simply because the pain started like a cramp. Diagnosis takes a medical assessment and testing, such as an ultrasound of the leg veins. The CDC advises alerting your doctor as soon as possible if you notice signs of a DVT, and the NHLBI advises calling right away, so if you cannot reach your provider promptly, go to the emergency room.
Other patterns worth mentioning to your provider rather than riding out on your own include cramps that are frequent, severe, repeatedly disrupt your sleep, or are not improving with simple measures (MedlinePlus gives similar advice for muscle cramps in general), a calf ache that lingers well after the cramp has passed, and numbness, tingling, or new weakness in your leg or foot.
Leg swelling is common in pregnancy, but swelling that is new or worsening quickly in both legs is worth a call to your provider, even without other symptoms. Swelling of the face or hands, or swelling along with a headache that will not go away, changes in your vision, or pain in the upper abdomen, can be a sign of preeclampsia, a blood pressure condition of pregnancy. ACOG notes that preeclampsia can develop quietly and that swelling is only one of its possible symptoms, so these symptoms and a high blood pressure reading should be assessed even if your legs look normal, and it advises calling your ob-gyn right away for a headache that will not go away, changes in eyesight, or pain in the upper abdomen. A seizure or sudden loss of consciousness in pregnancy is an emergency and can signal eclampsia. Our guides to preeclampsia warning signs and headaches during pregnancy cover them in more detail.
A clot in the leg can break loose and travel to the lungs, which is called a pulmonary embolism and can be life-threatening. The CDC lists difficulty breathing, chest pain that usually worsens with a deep breath or cough, a cough or coughing up blood, and a faster than normal or irregular heartbeat as possible signs, and advises seeking immediate medical attention for any of them. Fainting or severe lightheadedness also calls for emergency care, and a pulmonary embolism can occur without leg symptoms. The box below spells out which symptoms call for emergency care and which can be raised with your provider the same day or at your next appointment.

When to Seek Medical Care

When to Seek Urgent or Emergency Care

Most nighttime leg cramps in pregnancy are painful but not dangerous. The guidance below is about recognizing the less common leg symptoms that can point to a blood clot or a blood pressure problem instead of an ordinary cramp. If you think you may have a blood clot, contact a clinician or emergency services directly rather than using an online tool. This guidance is in addition to, not a replacement for, the general disclaimer above.

Emergency, call 911 or go to the emergency room immediately if:

  • Sudden shortness of breath, trouble breathing, or chest pain, especially pain that worsens with a deep breath or cough, with or without leg swelling or pain, which can signal a blood clot that has traveled to your lungs
  • Coughing up blood, a racing or irregular heartbeat, or fainting or severe lightheadedness, especially along with leg swelling or pain, which can also signal a blood clot in your lungs
  • New swelling, pain, or tenderness in one leg that an injury does not explain, skin that is warm, red, or discolored, or calf pain so severe that you cannot comfortably bear weight, even without shortness of breath. These can be signs of a blood clot in the leg: call your obstetric provider right away, go to the emergency room if you cannot reach them promptly, and call 911 if you also have trouble breathing or chest pain
  • A seizure or sudden loss of consciousness during pregnancy, which can signal eclampsia, a life-threatening blood pressure emergency
  • A headache that will not go away, changes in your vision such as spots or flashing lights, new or sudden swelling of your face or hands, or severe pain in the upper abdomen during pregnancy, which can signal preeclampsia. Call your obstetric provider right away, and go to the emergency room if you cannot reach them

See a doctor soon (same-day or next available appointment) if:

  • Cramps that are frequent, severe, repeatedly disrupt your sleep, or are not improving with stretching, hydration, and the sleep position changes above
  • Aching or tightness in the calf that lingers well after the cramp itself has released, without swelling, warmth, or redness
  • Numbness, tingling, or new weakness in the leg or foot along with the cramping
  • Swelling in both legs that is new or getting worse quickly, even without a headache or vision changes (call your provider right away if it comes on suddenly or is more than mild)
  • Restless legs symptoms that regularly disrupt your sleep, or unusual tiredness that could point to low iron
Still concerned about your symptoms?
Use the DocAi Health AI Symptom Checker to organize your symptoms, explore possible explanations, and understand what level of care may be appropriate.
Start Your Assessment →

Frequently Asked Questions

Are nighttime leg cramps in pregnancy a sign that something is wrong with the baby?

Leg cramps are common in pregnancy, and on their own they are not considered a sign of a problem with your baby. The exact cause is not fully understood. Cramps can still disrupt your sleep, which is worth mentioning at a prenatal visit, and any worry about your baby is a good reason to contact your provider.

Why do leg cramps often happen in the second and third trimesters?

Mayo Clinic notes that leg cramps in pregnancy often happen at night during the second and third trimesters, though the exact cause is not clear. Possible contributors include a growing uterus pressing on the veins that return blood from the legs, extra weight on the calf muscles, and changes in fluid and mineral balance, but none has been proven.

Can dehydration really cause nighttime leg cramps during pregnancy?

It is not clear. MedlinePlus lists dehydration among the things that can make muscle cramps more likely in general, but dehydration has not been established as a cause of pregnancy leg cramps. Drinking fluids steadily through the day is still a reasonable habit in pregnancy, and Mayo Clinic says keeping your muscles hydrated might help prevent cramps.

Is it safe to take a magnesium supplement for pregnancy leg cramps?

Talk with your prenatal care provider before adding any supplement. A 2020 Cochrane review of small trials could not say whether magnesium or calcium supplements reduce leg cramps in pregnancy, and Mayo Clinic describes the evidence for magnesium as mixed. The right dose depends on what is already in your prenatal vitamin and on your health history.

Do compression socks help with pregnancy leg cramps?

Compression stockings may help with leg swelling or heaviness, particularly if you spend a lot of time standing. They are not a proven treatment for pregnancy leg cramps themselves. If you are on your feet for long stretches, ask your provider whether graduated compression stockings make sense for you.

How long do pregnancy leg cramps usually last?

A single cramp usually lasts from a few seconds to several minutes and often eases once you stretch the muscle, though the calf can stay sore for a while afterward. If cramps are severe, keep coming back, or last a long time, MedlinePlus advises contacting your provider, and Mayo Clinic advises talking with your provider about possible treatment options.

Can leg cramps during pregnancy be a sign of a blood clot?

Sometimes, although a blood clot is much less common than an ordinary cramp. A DVT can begin with a cramp-like ache in the calf, so a clot cannot be ruled out simply because the pain started like a cramp. One-sided swelling, tenderness, warmth, or redness needs prompt medical assessment, because symptoms alone cannot confirm or rule out a clot.

When should I call my doctor about leg cramps every night?

Contact your prenatal care provider if cramps are frequent, severe, repeatedly disrupt your sleep, or are not improving with simple measures such as stretching, or if you notice numbness, tingling, or weakness along with the cramping. Call right away if one leg looks more swollen or feels warmer or more tender than the other. These patterns are less typical of ordinary pregnancy cramps and are worth having checked.
Need a Human Doctor?
We guide you when professional in-person care is required.
Connect with a Doctor