Skip to main content

Why Are You Having Leg Cramps During Pregnancy?

Why Are You Having Leg Cramps During Pregnancy?
On this page

Leg cramps during pregnancy are common due to circulation changes, dehydration, or nutrient deficiencies. Learn why they happen and safe ways to find relief fast.

Shubhra Mishra

By Shubhra Mishra — a mom of two who turned her own confusion during pregnancy into BumpBites, a global mission to make food choices clear, safe, and stress-free for every expecting mother. 💛

Are you a qualified maternal-health or nutrition expert? Join our reviewer circle.

Wondering about another food?

Check whether any food is safe during pregnancy with the BumpBites Food Safety Checker.

Quick take: Leg cramps during pregnancy are very common, especially at night and in the third trimester. They’re usually caused by muscle fatigue, poor circulation, or mineral imbalances—not a sign of something serious. Most women get relief with simple stretches, hydration, and gentle movement. But if cramps come with swelling, redness, or severe pain, check in with your provider to rule out other issues.

You’re six months pregnant, lying in bed, and suddenly—zap—a sharp pain shoots up your calf like a lightning bolt. You groan, rub the knot, and wonder: Is this normal? Did I do something wrong? Will it happen every night?

If this scene sounds familiar, you’re not alone. Nearly half of pregnant women experience leg cramps, especially after dark. They’re one of those pregnancy quirks that no one warns you about—until you’re Googling at 2 a.m., desperate for answers. The good news? Most of the time, these cramps are just your body’s way of adjusting to the extra weight and changes in circulation. But that doesn’t make them any less annoying (or painful).

In this guide, we’ll break down why leg cramps happen during pregnancy, when to worry (and when to relax), and what you can do tonight to ease the discomfort. No medical jargon—just clear, practical advice from our team and the experts we trust.

Pregnant woman sitting on the edge of her bed, rubbing her calf at night
Nighttime leg cramps are frustrating, but they’re usually not a sign of a bigger problem.

Why do my legs cramp at night during pregnancy?

You’re not imagining it—leg cramps do seem to strike hardest when you’re trying to sleep. Many women describe it as a sudden, intense tightening in the calf (or sometimes the foot or thigh) that wakes them up or makes it impossible to get comfortable. So why does this happen, and why at night?

Here’s what’s likely going on:

  • Muscle fatigue: Your growing belly shifts your center of gravity, putting extra strain on your leg muscles—especially your calves. By the end of the day, those muscles are tired and more prone to cramping.
  • Poor circulation: Your expanding uterus can press on blood vessels, slowing circulation in your legs. When blood flow is sluggish, muscles don’t get the oxygen and nutrients they need, making cramps more likely.
  • Dehydration or electrolyte imbalances: If you’re not drinking enough water or getting enough minerals like magnesium, calcium, or potassium, your muscles can spasm. This is especially common at night if you’ve been sweating during the day or not replenishing fluids well.
  • Pressure on nerves: Your growing baby can also press on nerves that run to your legs, which might trigger cramps or tingling.
  • Hormonal changes: Pregnancy hormones like progesterone relax blood vessels, which can slow circulation and contribute to cramping.

One reader, Sarah, told us: “I’d go to bed feeling fine, and then—BAM—my calf would seize up like a vice. It was like my muscle had a mind of its own. I’d limp to the bathroom, stretch it out, and hope it wouldn’t happen again.” Sarah’s experience is typical: nighttime cramps are unpredictable, but they’re rarely a sign of anything serious.

That said, if your cramps are severe, frequent, or accompanied by swelling or redness, it’s worth mentioning to your provider. (We’ll cover when to worry later in this article.)

Are leg cramps a sign of preeclampsia in pregnancy?

This is one of the biggest worries women have when they feel those sudden leg cramps—especially if they’ve heard that preeclampsia (a serious pregnancy condition involving high blood pressure) can cause swelling and discomfort. So let’s clear this up: leg cramps alone are not a sign of preeclampsia.

Preeclampsia is a complex condition, but the key symptoms to watch for are:

  • High blood pressure (usually diagnosed at a prenatal visit)
  • Severe headaches that don’t go away with rest or pain relief
  • Vision changes (like flashing lights, blurriness, or seeing spots)
  • Sudden swelling in your hands, face, or feet (not just mild puffiness)
  • Upper abdominal pain, often under your ribs on the right side
  • Nausea or vomiting in the second or third trimester
  • Shortness of breath or a racing heart

Leg cramps can happen alongside swelling (which is common in pregnancy), but if the cramps are your only symptom, preeclampsia is unlikely. That said, if you’re experiencing any of the symptoms above—especially if they’re new or severe—call your provider right away. Preeclampsia can develop quickly, and early treatment is crucial for you and your baby.

Here’s a quick comparison to help you tell the difference:

Symptom Common in Normal Pregnancy? Possible Sign of Preeclampsia?
Leg cramps (especially at night) Yes No, unless accompanied by other symptoms
Mild swelling in feet/ankles Yes No, unless sudden or severe
Sudden swelling in hands/face No Yes
Headaches that go away with rest Yes No
Severe headaches that don’t improve No Yes
Vision changes (flashing lights, blurriness) No Yes
Upper abdominal pain No Yes

If you’re ever unsure, it’s always better to check in with your provider. They can run a quick blood pressure check or urine test to rule out preeclampsia or other concerns.

How to prevent leg cramps in the third trimester

The third trimester is when leg cramps often peak—thanks to your growing belly, extra weight, and all the other changes your body is going through. The good news? There are plenty of things you can do to reduce the frequency and intensity of those midnight cramps. Here’s what works:

1. Stay hydrated (but not too much at night)

Dehydration is a major trigger for muscle cramps, so aim to drink plenty of water throughout the day. The American College of Obstetricians and Gynecologists (ACOG) recommends about 10 cups (2.3 liters) of fluids daily during pregnancy, but this can vary based on your activity level and climate. If you’re sweating a lot or spending time in hot weather, you may need even more.

That said, chugging a big glass of water right before bed can lead to extra trips to the bathroom—and disrupted sleep. Instead, try to sip steadily during the day and taper off in the evening. If you’re not sure if you’re drinking enough, check your urine color: pale yellow means you’re well-hydrated, while dark yellow is a sign to drink more.

2. Balance your electrolytes

Electrolytes—minerals like magnesium, calcium, potassium, and sodium—help your muscles contract and relax properly. When these are out of balance, cramps are more likely. Here’s how to keep them in check:

  • Magnesium: This mineral is a big player in muscle function. Many women find that increasing their magnesium intake helps with cramps. Good food sources include leafy greens, nuts, seeds, whole grains, and dark chocolate. If you’re struggling to get enough from food, ask your provider about a magnesium supplement (magnesium glycinate is a gentle option).
  • Calcium: Calcium works alongside magnesium to support muscle function. Dairy products, fortified plant milks, leafy greens, and almonds are all good sources. If you’re not getting enough from your diet, your provider may recommend a calcium supplement.
  • Potassium: Potassium helps regulate muscle contractions. Bananas are the classic go-to, but you can also find it in sweet potatoes, avocados, spinach, and beans.
  • Sodium: While too much sodium isn’t great for blood pressure, a little is necessary for muscle function. If you’re sweating a lot (or dealing with morning sickness), you might need a bit more. Try adding a pinch of salt to your meals or snacking on lightly salted nuts.

One reader, Maria, shared: “I started eating a banana and a handful of almonds every afternoon, and my cramps got so much better. It was like my muscles finally had the fuel they needed.”

3. Move your body (gently)

It might sound counterintuitive, but staying active can actually help prevent leg cramps. Gentle exercise improves circulation, strengthens muscles, and reduces the risk of cramping. Here are some safe options for the third trimester:

  • Walking (even a short stroll after dinner can help)
  • Prenatal yoga (focus on poses that stretch the calves and hamstrings)
  • Swimming or water aerobics (the buoyancy takes pressure off your joints)
  • Stationary biking (low-impact and great for circulation)

Aim for at least 30 minutes of moderate activity most days of the week, but listen to your body. If you’re feeling exhausted or uncomfortable, take it easy. The goal is to keep moving, not to push yourself.

4. Stretch before bed

Tight muscles are more prone to cramping, so stretching before bed can help keep them loose and relaxed. Here are a few simple stretches to try (hold each for 20–30 seconds, and repeat 2–3 times on each leg):

  • Calf stretch: Stand facing a wall, place your hands on the wall at shoulder height, and step one foot back. Keep your back heel on the ground and lean forward slightly until you feel a stretch in your calf. Switch sides.
  • Hamstring stretch: Sit on the edge of a chair with one leg extended straight out in front of you. Keep your back straight and lean forward slightly until you feel a stretch in the back of your thigh. Switch sides.
  • Foot flex: Sit on the edge of your bed and extend one leg. Gently pull your toes back toward your shin (like you’re trying to point them at your knee) to stretch your calf. Switch sides.

One mom, Lisa, told us: “I started doing these stretches every night, and my cramps went from daily to maybe once a week. It’s the first thing I recommend to my pregnant friends now.”

5. Wear supportive shoes

Your feet and legs are carrying a lot of extra weight these days, so give them some love with supportive, comfortable shoes. Look for:

  • Low heels (or no heels—flat shoes are best for circulation)
  • Good arch support (this helps distribute weight evenly)
  • A wide toe box (so your toes aren’t cramped)
  • Flexible soles (to allow for natural movement)

Avoid flip-flops or shoes with no support, as these can strain your calves and feet. If you’re on your feet a lot, consider compression socks (more on those below).

6. Try compression socks

Compression socks are designed to improve circulation in your legs, which can help prevent cramps and swelling. They work by gently squeezing your legs to help blood flow back to your heart. You can find them at most drugstores or online, and they come in a variety of styles and compression levels.

If you’re new to compression socks, start with a mild compression level (15–20 mmHg) and wear them during the day. Some women find they help so much that they wear them to bed, too. Just make sure they’re not too tight—you should be able to slip a finger under the top band.

7. Elevate your legs

If you’ve been on your feet all day, give your legs a break by elevating them for 10–15 minutes. Lie down on your left side (this takes pressure off your vena cava, a major blood vessel) and prop your legs up on a pillow or two. This helps improve circulation and reduces swelling, which can prevent cramps.

8. Avoid sitting or standing for too long

Staying in one position for too long—whether sitting or standing—can slow circulation and increase the risk of cramps. If you have a desk job, try to get up and walk around for a few minutes every hour. If you’re on your feet a lot, take breaks to sit down and elevate your legs. A simple rule of thumb: if you’ve been sitting for an hour, stand up and move. If you’ve been standing for an hour, sit down and rest.

Best stretches for pregnancy leg cramps

When a leg cramp strikes, your first instinct might be to rub the muscle or walk it off. But stretching is one of the fastest ways to relieve the pain and help the muscle relax. Here are the best stretches to try—both for prevention and for immediate relief.

Pregnant woman doing a calf stretch against a wall in her living room
Gentle stretches can help prevent cramps and relieve them when they happen.

For immediate relief (when a cramp strikes)

If you wake up to a cramp, try these steps to ease the pain quickly:

  1. Flex your foot: Sit up in bed and straighten your leg. Gently pull your toes back toward your shin (like you’re trying to point them at your knee). This stretches the calf muscle and can help the cramp release. Hold for 20–30 seconds.
  2. Massage the muscle: Use your hands to gently massage the cramped muscle in a circular motion. You can also try rolling a tennis ball or frozen water bottle under your foot for extra relief.
  3. Walk it off: If the cramp is in your calf, stand up and walk around for a minute or two. This helps improve circulation and can help the muscle relax.
  4. Apply heat or cold: If the muscle is still sore after the cramp passes, try applying a warm towel or heating pad for a few minutes. If it’s swollen or tender, an ice pack (wrapped in a towel) can help reduce inflammation.

For prevention (daily stretches)

Doing these stretches regularly can help keep your muscles loose and reduce the frequency of cramps. Aim to do them at least once a day, preferably before bed:

  • Calf stretch (wall lean):
    1. Stand facing a wall, about an arm’s length away.
    2. Place your hands on the wall at shoulder height.
    3. Step one foot back, keeping your heel on the ground.
    4. Lean forward slightly until you feel a stretch in your calf. Hold for 20–30 seconds.
    5. Switch sides and repeat.
  • Seated hamstring stretch:
    1. Sit on the edge of a chair with one leg extended straight out in front of you.
    2. Keep your back straight and lean forward slightly until you feel a stretch in the back of your thigh.
    3. Hold for 20–30 seconds, then switch sides.
  • Standing quad stretch:
    1. Stand near a wall or chair for support.
    2. Bend one knee and grab your ankle, pulling your heel toward your buttock.
    3. Keep your knees close together and your back straight. Hold for 20–30 seconds.
    4. Switch sides and repeat.

    Note: If you’re struggling with balance, you can do this stretch lying on your side instead.

  • Ankle circles:
    1. Sit or lie down and extend one leg.
    2. Slowly rotate your ankle in a circular motion, 10 times clockwise and 10 times counterclockwise.
    3. Switch sides and repeat.
  • Toe taps:
    1. Sit in a chair with your feet flat on the floor.
    2. Lift your toes while keeping your heels on the ground, then lower them back down.
    3. Repeat 10–15 times.

One mom, Priya, shared: “I started doing these stretches every night before bed, and my cramps went from daily to maybe once a week. It’s the first thing I recommend to my pregnant friends now.”

Does calcium deficiency cause leg cramps in pregnancy?

Calcium is a mineral that plays a key role in muscle function, nerve signaling, and bone health. During pregnancy, your body needs more calcium to support your growing baby’s bones and teeth—and if you’re not getting enough, it can lead to muscle cramps, among other symptoms. So, yes, calcium deficiency can contribute to leg cramps during pregnancy.

But it’s not the only cause. Leg cramps can also be triggered by:

  • Magnesium deficiency
  • Dehydration or electrolyte imbalances
  • Poor circulation
  • Muscle fatigue or overuse
  • Pressure on nerves or blood vessels

So how do you know if calcium deficiency is the culprit? Here are some signs to watch for:

  • Frequent leg cramps (especially at night)
  • Muscle twitches or spasms
  • Numbness or tingling in your hands or feet
  • Weak or brittle nails
  • Fatigue or weakness
  • Poor bone health (though this is harder to notice during pregnancy)

If you’re experiencing these symptoms, mention them to your provider. They can run a blood test to check your calcium levels or recommend a supplement if needed.

How much calcium do you need during pregnancy?

The recommended daily intake of calcium during pregnancy is 1,000 milligrams (mg) per day for women aged 19–50. This is the same as the recommendation for non-pregnant women, but your body absorbs calcium more efficiently during pregnancy, so you may not need to increase your intake much (if at all).

Here’s how much calcium is in some common foods:

Food Serving Size Calcium (mg)
Plain yogurt (low-fat) 1 cup (245 g) 415
Milk (whole or skim) 1 cup (240 mL) 300
Cheese (cheddar) 1 oz (28 g) 200
Fortified plant milk (almond, soy, oat) 1 cup (240 mL) 300
Kale (cooked) 1 cup (130 g) 94
Spinach (cooked) 1 cup (180 g) 245
Almonds 1 oz (28 g) 76
Chia seeds 1 tbsp (12 g) 88
Tofu (calcium-set) ½ cup (126 g) 253

If you’re struggling to get enough calcium from food, your provider may recommend a supplement. Calcium carbonate and calcium citrate are the most common types. Calcium carbonate is best absorbed with food, while calcium citrate can be taken with or without food. Avoid taking more than 500 mg of calcium at a time, as your body can’t absorb it all at once.

Calcium and magnesium: a dynamic duo

Calcium and magnesium work together to support muscle function. While calcium helps muscles contract, magnesium helps them relax. If you’re deficient in one, you might be deficient in the other. That’s why many women find that taking a magnesium supplement (or eating magnesium-rich foods) helps with leg cramps, too.

Good food sources of magnesium include:

  • Leafy greens (spinach, kale, Swiss chard)
  • Nuts and seeds (almonds, cashews, pumpkin seeds, chia seeds)
  • Whole grains (brown rice, quinoa, whole wheat bread)
  • Legumes (black beans, lentils, chickpeas)
  • Dark chocolate (aim for at least 70% cocoa)
  • Avocados

If you’re considering a magnesium supplement, talk to your provider first. Magnesium glycinate is a gentle, well-absorbed form that’s often recommended for pregnancy.

When should I be concerned about leg cramps while pregnant?

Most leg cramps during pregnancy are harmless, but there are times when they can signal something more serious. Here’s when to call your provider:

  • Severe or persistent pain: If your cramps are so painful that you can’t walk, sleep, or go about your daily activities, or if they last for more than a few minutes, let your provider know. Severe pain can sometimes be a sign of a blood clot (deep vein thrombosis, or DVT), especially if it’s in one leg and accompanied by swelling or redness.
  • Swelling, redness, or warmth: If one leg is significantly more swollen, red, or warm than the other, it could be a sign of a blood clot. DVT is rare in pregnancy, but it’s a medical emergency, so don’t wait to get it checked out.
  • Numbness or weakness: If you’re experiencing numbness, tingling, or weakness in your legs (especially if it’s on one side), it could be a sign of nerve compression or another issue. Mention it to your provider.
  • Cramps accompanied by other symptoms: If your leg cramps are happening alongside symptoms like severe headaches, vision changes, upper abdominal pain, or sudden swelling, it could be a sign of preeclampsia or another condition. Call your provider right away.
  • Frequent cramps that don’t improve: If you’re doing all the right things (stretching, hydrating, eating well) and your cramps aren’t getting better—or if they’re getting worse—check in with your provider. They can help rule out underlying issues like nutrient deficiencies or circulation problems.

One mom, Jessica, shared: “I thought my leg cramps were just part of pregnancy, but when one leg started swelling up and turning red, I knew something wasn’t right. Turns out, I had a blood clot. I’m so glad I trusted my gut and called my doctor.”

Remember: it’s always better to err on the side of caution. If something feels off, don’t hesitate to reach out to your provider. They’re there to help, and they’d rather hear from you than have you worry alone.

Can I take medication for leg cramps during pregnancy?

When leg cramps are keeping you up at night, it’s tempting to reach for a quick fix—like an over-the-counter pain reliever or muscle relaxant. But most medications for leg cramps aren’t recommended during pregnancy unless prescribed by your provider. Here’s what you need to know:

Over-the-counter pain relievers

Medications like ibuprofen (Advil, Motrin) and naproxen (Aleve) are not recommended during pregnancy, especially in the third trimester. These drugs can affect your baby’s heart and reduce amniotic fluid levels. Acetaminophen (Tylenol) is generally considered safe for occasional use during pregnancy, but it won’t treat the cramp itself—it’ll just dull the pain. Always check with your provider before taking any medication, even if it’s something you’ve taken before.

Muscle relaxants

Muscle relaxants like cyclobenzaprine (Flexeril) or methocarbamol (Robaxin) are not recommended during pregnancy. There’s limited research on their safety, and they can cause side effects like drowsiness or dizziness, which could increase your risk of falls. If you’re considering a muscle relaxant, talk to your provider first—they may recommend a safer alternative or refer you to a physical therapist.

Magnesium supplements

Magnesium supplements are often recommended for leg cramps during pregnancy, but it’s important to choose the right type and dose. Magnesium glycinate is a gentle, well-absorbed form that’s less likely to cause digestive upset. The recommended dose varies, but many providers suggest starting with 200–400 mg per day. Always talk to your provider before starting any new supplement, as too much magnesium can cause diarrhea or other side effects.

Calcium supplements

If your provider suspects a calcium deficiency, they may recommend a calcium supplement. Calcium carbonate and calcium citrate are the most common types. Calcium carbonate is best absorbed with food, while calcium citrate can be taken with or without food. Avoid taking more than 500 mg of calcium at a time, as your body can’t absorb it all at once. Also, be aware that calcium can interfere with the absorption of iron, so if you’re taking an iron supplement, space them out by a few hours.

Prescription medications

In rare cases, your provider may prescribe a medication to help with severe leg cramps. For example, if your cramps are caused by restless legs syndrome (RLS), they may recommend a low dose of a dopamine agonist like pramipexole (Mirapex). However, these medications are typically only used when other treatments haven’t worked, and they come with their own risks and side effects. Always follow your provider’s guidance.

What you can do instead

Since medications aren’t always an option during pregnancy, here are some safe, drug-free ways to manage leg cramps:

  • Stretch: Gentle stretches can help relieve cramps and prevent them from happening in the first place. Try the stretches we mentioned earlier in this article.
  • Stay hydrated: Dehydration can trigger cramps, so make sure you’re drinking enough water throughout the day. Aim for about 10 cups (2.3 liters) of fluids daily, but adjust based on your activity level and climate.
  • Eat a balanced diet: Focus on foods rich in magnesium, calcium, and potassium, like leafy greens, nuts, seeds, dairy products, and bananas. A well-balanced diet can help prevent nutrient deficiencies that contribute to cramps.
  • Move regularly: Gentle exercise like walking, swimming, or prenatal yoga can improve circulation and reduce the risk of cramps. Just listen to your body and avoid overexerting yourself.
  • Wear compression socks: Compression socks can improve circulation in your legs, which may help prevent cramps and swelling. They’re especially helpful if you’re on your feet a lot or have a job that requires sitting for long periods.
  • Apply heat or cold: A warm towel or heating pad can help relax a cramped muscle, while an ice pack can reduce inflammation and numb the pain. Try both to see what works best for you.
  • Massage: Gently massaging the cramped muscle can help it relax. You can also try rolling a tennis ball or frozen water bottle under your foot for extra relief.

One reader, Emma, told us: “I was so frustrated when my provider said I couldn’t take muscle relaxers for my cramps. But then I started doing those stretches every night, and I realized I didn’t need medication after all. It just took a little patience and consistency.”

Leg cramps after delivery: what to expect

You made it through pregnancy—congratulations! But if you’re still dealing with leg cramps after delivery, you might be wondering: Is this normal? When will it stop? The short answer is that leg cramps can linger for a few weeks postpartum, but they usually improve as your body recovers from childbirth.

Why do leg cramps happen after delivery?

Postpartum leg cramps can happen for a few reasons:

  • Hormonal shifts: Your body is still adjusting to the drop in pregnancy hormones like progesterone and relaxin, which can affect your muscles and circulation.
  • Fluid shifts: During pregnancy, your body holds onto extra fluid. After delivery, your body starts to shed that fluid, which can lead to swelling and cramping in your legs.
  • Nutrient deficiencies: If you’re breastfeeding, your body is still working hard to support your baby’s growth, which can deplete your stores of nutrients like magnesium, calcium, and potassium. These deficiencies can contribute to muscle cramps.
  • Physical recovery: Childbirth is a marathon for your body, and your muscles—including those in your legs—are still recovering. If you had a long labor or a C-section, your legs might feel extra tired or sore.
  • Breastfeeding posture: If you’re nursing, you might be sitting in awkward positions for long periods, which can strain your legs and lead to cramps.

How long will they last?

Most women find that their leg cramps improve within a few weeks of delivery, as their hormones stabilize and their body recovers. However, if you’re breastfeeding, you might experience cramps for a bit longer, especially if you’re not getting enough nutrients. If your cramps are severe or persistent, mention them to your provider—they can help rule out other issues like blood clots or nerve compression.

What you can do

The good news is that many of the same strategies that helped during pregnancy can also help postpartum:

  • Stay hydrated: Drink plenty of water, especially if you’re breastfeeding. Aim for at least 10 cups (2.3 liters) of fluids daily, and more if you’re sweating a lot or spending time in hot weather.
  • Eat a balanced diet: Focus on foods rich in magnesium, calcium, and potassium, like leafy greens, nuts, seeds, dairy products

Editor's pick for this topic

Not sure about the label on Why Am I Having Leg Cramps During Pregnancy products?

Snap the ingredients list (or paste it, or scan the barcode) and SafeFilter checks every ingredient against your stage of pregnancy — flagging what to avoid, what needs care, and what's fine.

Scan a label free

Informational only — not medical advice.

Shubhra Mishra

About the Author

When Shubhra Mishra was expecting her first child in 2016, she was overwhelmed by conflicting food advice — one site said yes, another said never. By the time her second baby arrived in 2019, she realized millions of mothers face the same confusion.

That sparked a five-year journey through clinical nutrition papers, cultural diets, and expert conversations — all leading to BumpBites: a calm, compassionate space where science meets everyday motherhood.

Her long-term vision is to build a global community ensuring safe, supported, and free deliveriesfor every mother — because no woman should face pregnancy alone or uninformed. 🌿

🌍 Stand with mothers, shape safer guidance

Join a small circle of experts who review BumpBites articles so expecting parents everywhere can decide with confidence.

⚠️ Always consult your doctor for medical advice. This content is informational only.