SymptomBones, joints & muscles
Cramps and Spasms: Why Muscles Tighten and What Helps
Cramps and spasms are sudden, involuntary contractions of a muscle. A cramp is a strong, painful tightening that locks the muscle for seconds to minutes, often in the calf or foot. A spasm can be a cramp, a twitch or a longer-lasting tightness, such as in the back or neck. Most are harmless and linked to tired muscles, exercise, dehydration or medicines. Frequent, spreading or persistent spasms can point to low minerals, nerve damage or a neurological condition.
Also called: Muscle cramps, muscle spasms, charley horse, muscle contractions, myospasm
At a glance
- What they are
- Involuntary muscle contractions, from brief twitches to painful locking cramps.
- Most common sites
- Calves, feet, thighs, back, neck and hands.
- Common causes
- Muscle fatigue, exercise, dehydration, pregnancy, medicines and older age.
- Medical causes
- Low potassium, calcium or magnesium, nerve compression, kidney disease, thyroid problems and dystonia.
- Relief
- Stretch and massage the muscle; treat the cause if cramps are frequent.
When to get help
Call 911 or go to the ER
- Spasms of the face, hands and feet with tingling around the mouth, especially after thyroid or parathyroid surgery (possible very low calcium)
- Jaw stiffness, painful spasms of the neck and body after a wound (possible tetanus)
- Severe muscle pain and weakness with dark brown urine (possible rhabdomyolysis)
See a doctor within a day or two
- Cramps with muscle weakness, numbness or difficulty walking
- Spasms with a high fever, confusion or a stiff neck
- Cramps with vomiting or diarrhea, dizziness or a very low urine output
- Calf cramping with a swollen, warm, tender calf (possible DVT)
Book a routine appointment
- Cramps several times a week, or that disturb sleep regularly
- Cramps starting after a new medicine, such as a diuretic or statin
- Muscle twitching with gradual weakness or muscle wasting
- Sustained twisting or abnormal postures of the neck, hand or foot
Usually safe to manage at home
- An occasional cramp during or after exercise or at night that eases with stretching
- Brief twitching of an eyelid or muscle after stress, caffeine or poor sleep
Cramp vs spasm: what is the difference?
The words overlap, but doctors use them slightly differently:
| Term | What it means | Example |
|---|---|---|
| Cramp | A sudden, painful, visible hardening of a whole muscle lasting seconds to minutes | A calf cramp at night |
| Spasm | Any involuntary contraction; can be brief or prolonged | Back spasm after lifting |
| Fasciculation | A small twitch under the skin without movement of the joint | Eyelid or calf twitching |
| Tetany | Sustained spasms of hands and feet from low calcium | Fingers flexed into a claw |
| Dystonia | Sustained contractions causing twisting postures | Neck turning to one side |
| Spasticity | Stiff, tight muscles from brain or spinal cord damage | After a stroke or in MS |
"Cramps" is also used for pain from internal organs that contract, such as menstrual cramps or stomach cramps. Those come from the smooth muscle of the uterus or bowel and have different causes from skeletal muscle cramps.
Common causes of muscle cramps
Exercise and muscle fatigue
Exercise-associated cramps happen during or after hard or unfamiliar exercise. Research suggests they come mainly from muscle fatigue and changed nerve signals in the spinal cord, rather than only from salt or water loss.
Night cramps
Nocturnal leg cramps are very common in older adults and in pregnancy. They often wake people with a calf or foot cramp.
Dehydration and heat
Heavy sweating in heat, especially during manual labor, can cause painful heat cramps.
Pregnancy
Leg cramps are common in the second and third trimesters.
Medicines
- diuretics (water pills), which can lower potassium and magnesium
- statins, which can cause muscle aches and cramps
- some asthma inhalers (beta-agonists)
- ACE inhibitors and some osteoporosis medicines
- stopping or starting some medicines, including alcohol withdrawal
Medical causes
- Electrolyte problems: low potassium, low calcium and low magnesium, often from vomiting, diarrhea, diuretics or kidney problems.
- Nerve compression: spinal stenosis and pinched nerves in the back cause cramps in the legs.
- Peripheral neuropathy: from diabetes, alcohol or vitamin deficiency.
- Kidney disease and dialysis.
- Thyroid problems: both underactive and overactive thyroid.
- Liver cirrhosis.
- Peripheral artery disease: cramping calf pain with walking that eases with rest (claudication).
- Neurological conditions: dystonia, Parkinson's disease, multiple sclerosis, motor neuron disease and the spasticity that follows a stroke or spinal injury.
Cramps and spasms by body area
- Calf and foot: most common; usually benign.
- Thigh: hamstring and quadriceps cramps after exercise.
- Back: spasms often follow a strain and lock the lower back for a few days.
- Neck: muscle spasm with a stiff neck; ongoing twisting may be cervical dystonia.
- Hand: writer's cramp, or tetany from low calcium.
- Face and eyelid: twitching from stress, or blepharospasm and hemifacial spasm.
How doctors find the cause
Frequent cramps prompt questions about timing, exercise, medicines, alcohol and other symptoms, and an exam of muscles, nerves and pulses. Tests may include:
- blood tests: sodium, potassium, calcium, magnesium, kidney and liver function, thyroid function, glucose and creatine kinase (CK)
- nerve conduction studies and EMG
- ultrasound of the leg veins if a clot is possible
How to stop a muscle cramp
- Stretch the muscle: for a calf cramp, straighten your leg and pull your toes toward your knee, or stand and press your heel to the floor.
- Massage the muscle firmly.
- Walk around or jiggle the leg.
- Apply heat to relax a tight muscle, or cold if it remains sore afterward.
Preventing cramps
- Stretch the calves and hamstrings before bed and after exercise.
- Drink enough fluids, especially in heat.
- Build up exercise gradually.
- Review medicines with your doctor.
- Treat any underlying cause, such as low potassium or thyroid disease.
Quinine is no longer recommended for routine cramps because of rare but serious side effects. Magnesium supplements have limited evidence for most people, though some find them helpful.
Frequently asked questions
What is the difference between a cramp and a spasm?
A cramp is a sudden, painful, sustained contraction of a muscle that you can often see and feel as a hard knot. A spasm is a broader term for any involuntary contraction, including cramps, brief twitches and longer-lasting tightness. In everyday use, the words are often interchangeable.
What causes frequent muscle cramps?
Frequent cramps are often linked to aging, exercise, pregnancy and medicines such as diuretics and statins. Medical causes include low potassium, calcium or magnesium, nerve damage, kidney disease, thyroid problems and cirrhosis. A blood test is a good first step if cramps are frequent.
How do I stop a muscle cramp quickly?
Gently stretch the cramping muscle and hold the stretch, then massage it. For a calf cramp, straighten the knee and pull your toes up toward you. Walking around also helps. The cramp usually releases within a minute.
Can low magnesium cause cramps?
Yes. Low magnesium makes nerves and muscles more excitable, causing cramps, twitching and sometimes tetany. It can result from diuretics, alcohol, diarrhea and some acid-reducing medicines. A blood test can check your level before you take supplements.
When should I see a doctor for muscle spasms?
See a doctor if spasms are frequent, severe or long-lasting, come with weakness, numbness or muscle wasting, follow a new medicine, or cause twisting postures. Get emergency care for spasms with jaw stiffness, tingling around the mouth, or dark urine.
Sources
This guide was written from current patient and clinical guidance, including:
- MedlinePlus: Muscle cramps
- Mayo Clinic: Muscle cramp - Symptoms and causes
- American Academy of Neurology: Treatment of muscle cramps (evidence-based guideline)
- NHS: Cramp
- Cleveland Clinic: Muscle spasms