SymptomBones, joints & muscles
Leg Cramps or Spasms: Why They Happen and How to Stop Them
Leg cramps are sudden, involuntary and painful tightening of a leg muscle, most often the calf, sometimes the thigh or foot. They usually last seconds to a few minutes and often strike at night. Most are harmless and linked to age, muscle fatigue, pregnancy or medicines such as diuretics. Frequent cramps can come from low minerals, nerve problems or poor circulation. Cramping calf pain that comes on with walking and eases with rest is different and suggests artery disease.
Also called: Charley horse, calf cramps, night leg cramps, nocturnal leg cramps, leg muscle spasms
At a glance
- What it is
- A sudden, painful, involuntary contraction of a leg muscle, usually the calf.
- When
- Commonly at night or after exercise; about a third of adults over 60 get night cramps.
- Common causes
- Aging, muscle fatigue, pregnancy, dehydration, diuretics and statins.
- Medical causes
- Low potassium, magnesium or calcium, neuropathy, kidney disease, thyroid disease.
- Relief
- Stretch the calf by pulling the toes up, massage and walk around.
When to get help
Call 911 or go to the ER
- A swollen, red, warm calf with pain, especially with shortness of breath or chest pain (possible blood clot)
- Severe leg pain with a cold, pale, numb leg (possible blocked artery)
- Severe muscle pain and weakness after intense exercise or a crush injury, with dark brown urine (possible rhabdomyolysis)
See a doctor within a day or two
- Cramps with new leg weakness, numbness or back pain
- Cramps with vomiting, diarrhea, confusion or very little urine
- Calf pain on walking that stops you within a set distance and eases with rest (possible artery disease)
Book a routine appointment
- Cramps several times a week, or that disrupt your sleep
- Cramps that started with a new medicine, especially a diuretic or statin
- Cramps with muscle twitching, wasting or gradual weakness
- An urge to move the legs at rest, relieved by moving (restless legs)
Usually safe to manage at home
- An occasional calf cramp at night or after exercise that eases with stretching
What a leg cramp feels like
A cramp comes on suddenly. The muscle becomes rock-hard and visibly tight, and the pain is intense. The foot or toes may be pulled downward. The cramp usually releases within a few minutes, but the muscle can feel sore for a day afterward. A cramp in the calf is often called a charley horse.
Leg cramps are different from:
| Condition | How it differs |
|---|---|
| Restless legs syndrome | An uncomfortable urge to move the legs at rest, relieved by moving; no hard, locked muscle |
| Claudication (peripheral artery disease) | Cramping calf pain brought on by walking, eased within minutes of rest |
| Periodic limb movements | Repeated jerks of the legs during sleep, often noticed by a partner |
| Muscle twitching (fasciculations) | Small flickers under the skin without pain or locking |
| Nerve pain | Burning, tingling or shooting pain rather than a hard muscle |
Causes of leg cramps
Night leg cramps (nocturnal cramps)
Night cramps are very common in older adults. The exact cause is unknown in most people. Contributing factors include:
- age-related loss of muscle and shortened tendons
- sitting for long periods or standing on hard floors all day
- sleeping with the toes pointed down, which shortens the calf
- muscle fatigue from the day's activity
Exercise-related cramps
These come during or after hard or unfamiliar exercise, especially in heat. Muscle fatigue is the main driver, with dehydration and salt loss contributing.
Pregnancy
Leg cramps are common in the second and third trimesters, especially at night. The reasons are not fully understood.
Medicines
- diuretics (water pills), which can lower potassium and magnesium
- statins for cholesterol
- long-acting asthma inhalers (beta-agonists)
- some osteoporosis medicines, ACE inhibitors and ARBs
- opioid withdrawal
Medical conditions
- Electrolyte imbalance: low potassium, magnesium, calcium or sodium, often from vomiting, diarrhea, diuretics or alcohol.
- Peripheral neuropathy: from diabetes, alcohol or vitamin B12 deficiency; often with numb or burning feet.
- Spinal stenosis and pinched nerves: cramping leg pain when standing or walking, eased by sitting or bending forward.
- Kidney disease and dialysis.
- Hypothyroidism: cramps, muscle aches and stiffness.
- Liver cirrhosis.
- Motor neuron disease: cramps with twitching and progressive weakness.
Leg pain that only feels like a cramp
- Peripheral artery disease: narrowed leg arteries cause calf cramping with walking (claudication). Smokers, people with diabetes and those over 60 are at higher risk.
- Deep vein thrombosis: a blood clot causes a constant ache with swelling and warmth, rather than a brief cramp.
How doctors assess frequent leg cramps
A doctor will ask when cramps happen, how often, which muscles, what medicines you take, and about numbness, weakness or walking pain. The exam checks muscles, reflexes, sensation and foot pulses. Blood tests may include potassium, magnesium, calcium, sodium, glucose, kidney and liver function, thyroid function and creatine kinase. An ankle-brachial index or ultrasound checks circulation if claudication is suspected.
How to stop a leg cramp
- Calf cramp: straighten your leg and pull your toes toward your shin, or stand and lean forward against a wall with the heel flat on the floor.
- Thigh (hamstring) cramp: straighten the leg and bend forward at the hips.
- Front of the thigh: hold your ankle and bend your knee to bring the heel toward your buttock.
- Massage the muscle and walk around.
- A warm shower or heat pack can relax the muscle; ice can ease soreness afterward.
Preventing leg cramps
- Stretch your calves for a few minutes before bed. Studies show regular calf stretching can reduce night cramps.
- Keep bedding loose so your toes are not pointed down.
- Drink enough fluid, especially in heat or during exercise.
- Wear supportive shoes.
- Review medicines with your doctor.
Quinine is not recommended for leg cramps. The FDA has warned against it because of serious side effects, including blood disorders. Magnesium supplements have not been shown to help most older adults with night cramps, though they may help some people, and evidence in pregnancy is mixed.
Frequently asked questions
What causes leg cramps at night?
Night leg cramps are usually linked to aging, muscle fatigue, long periods of sitting or standing, and sleeping with the toes pointed. Pregnancy, diuretics, statins, low minerals, nerve problems and kidney or thyroid disease can also contribute. Often no single cause is found.
How do I stop a leg cramp fast?
Stretch the cramping muscle. For a calf cramp, straighten your leg and pull your toes toward you, or stand and push your heel down. Massage the muscle and walk around. Most cramps ease within a minute or two.
Are leg cramps a sign of something serious?
Usually not. Most leg cramps are harmless. See a doctor if cramps are frequent or severe, come with weakness, numbness or swelling, started with a new medicine, or if you get cramping calf pain while walking that eases with rest.
Can dehydration cause leg cramps?
Dehydration and salt loss can contribute, especially during exercise in heat. However, most night cramps are not caused by dehydration. Drinking enough fluid is sensible, but regular calf stretching is more effective for preventing night cramps.
Why do I get leg cramps in pregnancy?
Leg cramps are common in the second and third trimesters. The cause is unclear but may involve changes in circulation, extra weight and pressure on nerves. Calf stretching before bed and staying active help. Check with your doctor before taking supplements.
Sources
This guide was written from current patient and clinical guidance, including:
- American Academy of Family Physicians: Nocturnal leg cramps
- American Academy of Neurology: Treatment of muscle cramps (evidence-based guideline summary)
- NHS: Leg cramps
- MedlinePlus: Muscle cramps
- FDA: Quinine sulfate safety communication for leg cramps