ConditionBones, joints & muscles
Leg Cramps
Leg cramps are sudden, involuntary and painful tightening of a leg muscle, usually the calf, sometimes the foot or thigh. They last from seconds to several minutes and can leave the muscle sore for a day. Night-time leg cramps are very common, especially after age 50 and in pregnancy. Most have no serious cause, but they can be triggered by exercise, dehydration, certain medicines, and conditions such as nerve damage or low potassium or magnesium. Stretching the muscle is the quickest way to relieve one.
Also called: Nocturnal leg cramps, calf cramps, charley horse, muscle cramps in the legs, night cramps
At a glance
- What it is
- A sudden, painful, involuntary muscle contraction, usually in the calf.
- Who gets them
- Common in adults over 50, pregnant women, athletes and people on certain medicines.
- Common triggers
- Exercise, dehydration, long sitting or standing, tight muscles, diuretics, statins.
- Fast relief
- Stretch the muscle: pull your toes toward you, or stand and lean forward with the heel down.
- Prevention
- Regular calf stretches before bed; review medicines; treat underlying conditions.
When to get help
Call 911 or go to the ER
- Calf pain with swelling, warmth and redness that does not go away, with sudden breathlessness or chest pain (possible blood clot in the lung). Call 911 or your local emergency number
See a doctor within a day or two
- One swollen, tender, warm calf that stays painful between cramps (possible deep vein thrombosis)
- Cramps with dark urine and severe muscle weakness after intense exercise or starting a statin
- Cramps with muscle weakness, twitching or wasting that is getting worse
Book a routine appointment
- Frequent cramps that disturb sleep despite stretching
- Cramps that started after a new medicine
- Calf pain when walking that eases with rest (possible artery disease)
- Cramps with numbness or tingling in the feet
Usually safe to manage at home
- Occasional night cramps that ease with stretching and leave only brief soreness
- Cramps during or after exercise in hot weather
What happens during a leg cramp
A cramp is a sustained, involuntary contraction of a muscle that you cannot relax by will. The muscle feels hard and knotted, and the foot may point down or the toes curl. The exact cause is not fully understood, but it is thought to come from overexcited nerve endings in the muscle, especially when the muscle is contracting in a shortened position, as when lying with the toes pointed.
Leg cramps are different from:
- Restless legs syndrome: an uncomfortable urge to move the legs, relieved by movement, without a painful tight muscle
- Claudication: cramping calf pain when walking that eases with rest, from peripheral artery disease
- Muscle strain: pain from injury that persists with movement
Causes and triggers
Common, usually harmless causes
- No identifiable cause: most night cramps
- Age: muscles and tendons shorten and nerves change with age
- Exercise: muscle fatigue, especially in heat
- Dehydration and sweating
- Long periods of sitting, standing on hard floors, or sleeping with toes pointed
- Pregnancy: particularly in the second and third trimesters
Medicines linked to leg cramps
| Medicine | Notes |
|---|---|
| Diuretics (water pills) | Especially thiazides; may lower potassium and magnesium |
| Statins | Muscle aches and cramps; rarely muscle damage |
| Long-acting beta-agonist inhalers | Used for asthma and COPD |
| Some blood pressure medicines | ACE inhibitors, ARBs in some people |
| Raloxifene, estrogen | |
| Pregabalin, gabapentin | |
| Some diabetes and psychiatric medicines |
Medical conditions
- low potassium (hypokalemia), low magnesium (hypomagnesemia), low calcium
- dehydration
- peripheral neuropathy, including from diabetes and alcohol
- lumbar spinal stenosis
- kidney failure and dialysis
- liver cirrhosis
- hypothyroidism
- Parkinson's disease
- motor neuron disease (ALS), where cramps come with weakness and twitching
How to stop a leg cramp
- Stretch the muscle. For a calf cramp, straighten your leg and pull your toes toward your face, or stand and put weight on the affected leg with the knee straight, leaning forward.
- Walk around, or stand on your heels.
- Massage the muscle firmly.
- Apply heat to relax a tight muscle, or ice for lingering soreness afterward.
For a thigh cramp at the back (hamstring), straighten the leg and lean forward. For the front (quadriceps), hold the ankle and bend the knee, pulling the heel toward the buttock.
Diagnosis
A doctor will ask how often cramps happen, where, when, what triggers them, your medicines and other symptoms. They will examine your legs, pulses, nerves and muscles. Tests are not needed for typical cramps, but may include:
- blood tests: potassium, magnesium, calcium, kidney and liver function, thyroid, glucose, and CK if muscle damage is suspected
- ankle-brachial index for suspected artery disease
- nerve tests for suspected neuropathy
- ultrasound if a blood clot is possible
Treatment and prevention
Stretching
The most useful habit is calf stretching before bed: stand an arm's length from a wall, step one foot back, keep the heel on the floor and the back knee straight, and lean forward for 30 seconds. Repeat 3 times on each leg. Some studies show stretching reduces night cramps.
Other measures
- stay hydrated, especially in heat and when exercising
- avoid sleeping with toes pointed: keep bedding loose at the foot of the bed, or sleep with a pillow under the knees on your side
- wear supportive shoes
- limit alcohol and caffeine
- review medicines with your doctor
Supplements and medicines
- Magnesium: evidence shows little benefit for typical night cramps in older adults; it may help some pregnant women, though results are mixed.
- Quinine: once used, but the FDA warns against quinine for leg cramps because of serious and sometimes fatal side effects. It should not be used for this purpose.
- Vitamin B complex and others have limited evidence.
- Treating the cause, such as correcting low potassium or improving diabetes control, helps secondary cramps.
In pregnancy
Gentle stretching, regular walking, hydration, and lying on the left side may help. Discuss magnesium or calcium supplements with your prenatal care provider.
Frequently asked questions
What causes leg cramps at night?
Most night cramps have no clear cause. Contributing factors include age, muscle fatigue, dehydration, sitting or standing for long periods, sleeping with toes pointed, pregnancy, and medicines such as diuretics or statins. Less often, nerve, kidney or mineral problems are involved.
How do I stop a leg cramp fast?
Stretch the cramping muscle. For the calf, straighten your leg and pull your toes toward you, or stand and press your heel to the floor while leaning forward. Massage and walking also help. The cramp usually releases within seconds to minutes.
Is magnesium good for leg cramps?
For most older adults with night cramps, studies show magnesium supplements are unlikely to help. It may help some pregnant women, though evidence is mixed. Low magnesium from medicines or illness should be treated. Ask your doctor before starting supplements.
When are leg cramps serious?
Most are harmless. See a doctor if cramps are frequent and disrupt sleep, come with muscle weakness, wasting or numbness, or started after a new medicine. A swollen, warm, constantly painful calf needs prompt care to rule out a blood clot.
Why do I get leg cramps in pregnancy?
Leg cramps are common in the second and third trimesters, likely from extra weight, changes in circulation, fatigue and pressure on nerves and blood vessels. Gentle calf stretches, staying active and hydrated, and changing position often can help.
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
- NHS: Leg cramps
- MedlinePlus: Muscle cramps
- US FDA: Safety announcement on quinine for leg cramps