Cramps can be a real nightmare, especially when they wake you at night. Leg cramps most commonly hit your calves and hamstrings, though they can show up in just about any muscle. Sometimes they seem to come out of nowhere, but they can also be clearly related to your movements.

What’s Going On?

Muscle cramps happen when a muscle involuntarily contracts on its own. Usually, you feel a hard lump at the point of pain — that’s the contracted muscle. Cramps usually occur for a reason. If you haven’t strained a muscle, you’re probably cramping because you’re muscle is fatigued or overused, because your body is dehydrated, or because you’re not getting enough electrolytes, such as potassium or magnesium. Those minerals help your muscles work more smoothly, and fluids help your body process the minerals. 

Most cases of muscle cramps do not indicate a worrisome underlying condition. People who are 65 and older are at more risk for them. Cramps might be related to alcoholism, hypothyroidism, or diabetes. If the frequency of your cramps bothers you, tell your doctor.

Meanwhile, there are several remedies you can try yourself. 

Treating a Muscle Cramp


Relax the cramping muscle. Stop any activity that may have induced the cramp and lightly stretch the muscle, gently holding the stretch. You may even massage the muscle while or after you stretch, and maybe apply a heating pad as described below, to the area after stretching. 


“My first recommendation for patients coming in with leg cramps is magnesium,” says Sarah Thompson, a doula and acupuncturist at Sacred Vessel Acupuncture. Magnesium has been suggested for treating pregnant women’s muscle cramps, but more studies are needed. Talk to your doctor before taking any supplements if you’re pregnant. 

If you regularly have leg cramps that are not related to a more serious condition, you might try adding more magnesium to your diet. Nuts and seeds are excellent sources of magnesium.

Read More: 10 Foods High in Magnesium »

Hot Soak

Many professionals like personal trainers, coaches, and physical therapists also recommend magnesium on the outside of your body, in the form of Epsom salts. This old-school remedy can be applied to a wet cloth and pressed onto a cramped muscle, or you can add some to a hot bath for a soak. 

In fact, a hot soak provides relief for many, with or without Epsom salts. Dry heat may even help. “If you’re not near a bathtub, grab a heating pad,” says certified personal trainer Shane Allen. Start the pad on the lowest setting and only increase heat if you’re not getting any soothing at all. If you have diabetes, a spinal cord injury, or another condition that might prevent you from feeling heat, a heating pad is not a good option. 


Another possible way to stop leg cramps is to hydrate. It might take a little longer to address your pain, but once you have had water or a sports drink with electrolytes, you could prevent another cramp.

Get Moving

“If you are experiencing leg cramps, the best thing that you can do is walk around,” says certified personal trainer Henry Halse. “This will send the signal that your muscle needs to contract and then relax. Think of it as hitting the reset button on the muscle.” If all else fails, and you continue to have regular muscle cramps, Halse advises getting regular massages, which is a nice idea whether you have muscle cramps or not.