How to Get Rid of Muscle Cramps: What Actually Works

Most muscle cramps release within seconds if you stretch the affected muscle and hold the position. For a calf cramp, straighten your leg and pull your toes toward your shin, holding for 30 to 60 seconds. Gently massaging the muscle while stretching speeds relief. If cramps keep coming back, the fix usually involves hydration, minerals, and a few simple habit changes.

How to Stop a Cramp Right Now

The goal is to lengthen the muscle that’s locked in contraction. Which stretch you use depends on where the cramp hits.

For a calf cramp, keep your leg straight and pull the top of your foot toward your face. You can also stand and press your weight down through the cramping leg with your heel flat on the floor. Another option: face a wall, place your hands on it, step the cramping leg back with the knee straight and heel down, then lean forward until you feel the stretch. Hold for 30 to 60 seconds.

For a front thigh cramp, grab the foot on that side and pull it toward your buttock. Hold on to a chair or wall for balance.

For a back thigh (hamstring) cramp, straighten the leg and lean forward at the hips, or stand with your weight on the cramping leg and press down firmly.

Once the cramp releases, gently rub the muscle. Walking around on your heels for a minute can help prevent it from locking up again right away.

Pickle Juice and Other Fast Remedies

One tablespoon of pickle juice has been shown to stop cramps within about a minute in lab settings. The mechanism isn’t about replacing lost salt. The acid in the brine triggers nerves in the back of the throat, which sends a signal that essentially tells the cramping muscle to relax. Any strongly acidic liquid, like mustard or vinegar, appears to work through the same pathway.

Heat also helps. A warm towel or heating pad placed over the cramping muscle reduces the spasm by loosening tight tissue. Save ice for after the cramp passes if the area feels sore. Cold is better for reducing inflammation and tenderness than for releasing an active contraction.

Staying Hydrated Enough to Prevent Cramps

Dehydration is one of the most common and most fixable cramp triggers. A useful formula from Mass General Brigham: multiply your body weight in pounds by 0.67 to get your daily water target in ounces. Then add 12 ounces for every 30 minutes of exercise. A 150-pound person who exercises for an hour would need roughly 125 ounces that day.

You don’t need to hit that number precisely, but if you’re regularly cramping and your urine is dark yellow, you’re likely not drinking enough. Spacing fluids throughout the day works better than drinking large amounts at once, especially before bed if nighttime cramps are the problem.

What the Evidence Says About Magnesium

Magnesium supplements are probably the most popular cramp remedy, but the research is surprisingly underwhelming. A large Cochrane review pooling 11 trials and 735 people found that magnesium made almost no difference for the general population with unexplained cramps. In older adults with nocturnal leg cramps, the reduction in cramp frequency compared to placebo was small and not statistically significant. People taking magnesium were no more likely to see a 25% improvement in cramp frequency than people taking a sugar pill.

For pregnancy-related cramps, the results were mixed. Out of three placebo-controlled trials, one found a benefit, one found none, and one gave inconsistent results. Magnesium supplements are generally safe, though up to 37% of people in trials experienced digestive side effects like diarrhea.

If you want to try magnesium anyway, it’s unlikely to cause harm in standard doses. Just know the evidence doesn’t strongly support it for most people.

B Vitamins and Calcium

Vitamin B complex has more promising, if limited, data. A small clinical trial found that a B complex supplement including 30 mg of vitamin B6 per day led to cramp remission in 86% of treated patients who weren’t already vitamin-deficient. The American Academy of Neurology considers B complex “possibly effective” for cramp management, alongside calcium channel blockers.

Calcium matters most during pregnancy. Some research links lower blood calcium levels in pregnant women to more frequent leg cramps. The recommended intake during pregnancy is 1,000 milligrams per day, which you can get through dairy, fortified foods, or a supplement.

Preventing Nighttime Leg Cramps

Cramps that wake you at 3 a.m. are among the most disruptive. A few habits reduce how often they strike. Stretching your calves before bed, using the wall stretch described above and holding for 30 seconds per leg, is one of the most consistently recommended interventions. Staying hydrated in the evening (without drinking so much you’re up all night) helps too.

During a nighttime cramp, straighten your leg and flex your foot, pulling your toes toward your shin. If you can stand, walk around on your heels for a minute. After the cramp releases, a warm bath or heating pad on the muscle can prevent it from seizing again.

One thing to avoid: quinine. Once widely prescribed for leg cramps, the FDA does not consider it safe or effective for this use. Quinine can cause dangerous drops in platelet counts, severe allergic reactions, and heart rhythm problems. Deaths and kidney failure requiring dialysis have been reported. The FDA has added a boxed warning specifically about using quinine for leg cramps.

Cramp Relief During Pregnancy

Leg cramps are common in the second and third trimesters. The same calf stretches work, and doing them nightly before bed can reduce how often cramps occur. Stand at arm’s length from a wall, step one foot back, keep that knee straight and heel on the floor, then lean forward into the wall. Hold for about 30 seconds per side.

If a cramp strikes, stretch the calf, then walk around briefly before sitting down and elevating your legs. A hot shower, warm bath, ice massage, or gentle muscle massage are all considered safe during pregnancy. A magnesium supplement is reasonable to try given the possible (if uncertain) benefit, and calcium intake should be at least 1,000 milligrams daily.

Warning Signs That Need Medical Attention

Ordinary muscle cramps, while painful, resolve on their own and aren’t dangerous. But cramps that are far more severe than you’d expect, that come with muscle weakness or the inability to finish a workout you’d normally handle, or that produce dark tea- or cola-colored urine could signal rhabdomyolysis, a condition where muscle tissue breaks down and releases proteins that can damage the kidneys. The CDC advises seeking medical care immediately if any of these symptoms appear, because early treatment significantly improves outcomes.

Cramps that happen frequently despite good hydration and stretching, that affect multiple muscle groups, or that come with numbness or swelling are also worth discussing with a doctor, as they can occasionally point to nerve compression, circulation problems, or mineral imbalances that blood work can identify.