How to Get Rid of Leg Cramps During Pregnancy

Leg cramps during pregnancy are extremely common, especially in the second and third trimesters, and they tend to strike at night. The good news: a combination of stretching, staying hydrated, keeping active, and possibly adding magnesium can significantly reduce how often they happen and how badly they hurt. Here’s what actually works.

What to Do When a Cramp Hits

When a cramp seizes your calf at 2 a.m., your instinct might be to point your toes or curl up. Do the opposite. Flex your foot by pulling your toes toward your shin. This lengthens the cramping muscle and forces it to relax. You can do this while still lying in bed by hooking a towel or a sheet around the ball of your foot and gently pulling it toward you, keeping your knee as straight as comfortable.

Once the sharp pain passes, massage the muscle with your hands or a foam roller, and apply warmth. A heating pad or warm towel on the calf for a few minutes helps loosen any lingering tightness and brings blood flow back to the area. Walking around for a minute or two can also help the muscle fully release.

Stretch Before Bed Every Night

A simple calf stretch before you get into bed is one of the most consistently recommended ways to prevent nighttime cramps. Stand at arm’s length from a wall with your hands flat against it. Step one foot behind the other. Slowly bend your front knee forward while keeping your back knee straight and your back heel pressed into the floor. Hold for about 30 seconds, keeping your back straight and hips facing forward. Don’t angle your feet inward or outward. Switch legs and repeat.

This targets the gastrocnemius, the large calf muscle responsible for most pregnancy cramps. Doing it nightly, right before sleep, keeps the muscle lengthened during the hours when cramps are most likely to strike. If you wake with a cramp, this same stretch (standing or seated with a towel) is your first line of relief.

Stay Active During the Day

Regular physical activity reduces cramp frequency. Walking, swimming, and prenatal yoga all keep blood circulating through your legs and prevent the kind of muscle fatigue that sets the stage for nighttime spasms. You don’t need an intense workout. Even a 20 to 30 minute walk helps, particularly if you spend most of your day sitting or standing in one position.

Avoid standing still for long stretches. If your job keeps you on your feet, shift your weight between legs frequently and take short walking breaks. If you sit at a desk, flex and point your feet periodically, and get up to move every hour.

Drink Enough Water

Dehydration makes muscles more prone to cramping, and your fluid needs increase substantially during pregnancy. National guidelines recommend pregnant women drink between 1.9 and 3 liters of water per day, yet research from Penn State found that many pregnant women fall short of this amount. That’s roughly 8 to 12 cups a day, more if you’re exercising or it’s hot outside.

A practical check: your urine should be pale yellow. If it’s dark or concentrated, you need more fluids. Keeping a water bottle with you throughout the day and drinking consistently, rather than trying to catch up in the evening, helps maintain the electrolyte balance your muscles depend on.

Magnesium May Help

Magnesium is involved in muscle contraction and relaxation, and several trials have tested whether supplementing it reduces pregnancy leg cramps. In one study, women taking 300 mg of magnesium bisglycinate daily for four weeks experienced a 50% reduction in both cramp frequency and intensity. Another trial using 300 mg of magnesium citrate also showed improvements, and a separate study found that women with low magnesium levels who supplemented with 200 mg had fewer cramps overall.

The results aren’t perfectly consistent across every study, but the trend favors magnesium, particularly for women who aren’t getting enough through diet. Magnesium-rich foods include spinach, almonds, pumpkin seeds, black beans, avocado, and dark chocolate. If you’re considering a supplement, magnesium citrate and magnesium bisglycinate are the forms with the most evidence behind them for cramps. Your prenatal vitamin may already contain some magnesium, so check the label before adding more.

Calcium and Other Supplements

Calcium is often mentioned alongside magnesium for cramp prevention, but the evidence is much weaker. A large Cochrane review of the available trials found that the data on calcium supplements for pregnancy leg cramps is unclear, with studies too small and too inconsistent to draw firm conclusions. One small study showed a slight reduction in cramp frequency with oral calcium, but another found that calcium combined with vitamin D made little to no difference compared to a placebo.

This doesn’t mean calcium is unimportant during pregnancy. It absolutely is, for bone health and many other reasons. But if your primary goal is cramp relief, magnesium has more supporting evidence than calcium does.

Try Compression Socks

Graduated compression socks, the kind that are tighter at the ankle and gradually loosen toward the knee, can help with both leg cramps and the swelling that often accompanies them. They work by supporting blood flow back up from your lower legs, reducing the pooling and fluid buildup that contribute to muscle discomfort.

For mild swelling and cramps, socks rated at 15 to 20 mmHg offer gentle support and tend to be the most comfortable for everyday wear. If you’re dealing with varicose veins or more significant swelling, 20 to 30 mmHg provides firmer compression. Fit matters: socks that are too tight at the top can restrict circulation rather than help it. Knee-high styles are generally sufficient for calf cramps.

Sleep Position and Pillow Placement

How you position your legs at night can make a difference. Sleeping on your side (left side is generally preferred during pregnancy for circulation) with a pillow between your knees keeps your hips and legs aligned and reduces strain on your calf muscles. Some women find that elevating their feet slightly with a pillow under the lower legs helps reduce swelling and cramping overnight.

Avoid sleeping with your toes pointed downward, which shortens the calf muscle and can trigger a cramp. If you notice that heavy blankets push your feet into a pointed position, try loosening the covers at the foot of the bed or using a lighter blanket.

When Leg Pain Signals Something Else

Most pregnancy leg cramps are harmless, but leg pain that doesn’t behave like a cramp deserves attention. A normal cramp comes on suddenly, grips the muscle hard, and then releases within seconds to a few minutes. Deep vein thrombosis, a blood clot in the leg, feels different.

Watch for these signs, which can develop in one leg:

  • Persistent pain, swelling, and tenderness in one calf, especially pain that gets worse when you walk rather than easing with stretching
  • Warm skin over the affected area
  • Red or discolored skin at the back of the leg below the knee

Pregnancy increases the risk of blood clots because your blood clots more easily and your growing uterus puts pressure on the veins that return blood from your legs. Swelling and general discomfort in your legs are common and usually harmless during pregnancy, but if you notice the combination of one-sided pain, warmth, and redness, contact your midwife or doctor promptly. DVT is treatable, but it needs to be caught early.