Why Do I Get Cramps in My Feet?

Foot cramps—sudden, involuntary, painful contractions of the foot or toe muscles—are extremely common and affect people of all ages. The intrinsic muscles of the foot (small muscles within the foot that flex, extend, and spread the toes and support the arch) and the extrinsic muscles (the longer muscles of the lower leg whose tendons cross into the foot) can both produce cramps. Most foot cramps are benign and transient, but frequent, severe, or persistent cramps warrant evaluation for underlying causes including electrolyte imbalance, dehydration, peripheral neuropathy, circulation problems, and medication side effects.
Common Causes of Foot Cramps
Dehydration and Electrolyte Imbalance
Dehydration and low electrolyte levels—particularly low potassium, magnesium, calcium, and sodium—are among the most common causes of muscle cramping. These electrolytes regulate muscle cell excitability and contraction; when depleted, the muscle cell threshold for spontaneous firing is lowered, producing cramps. Athletic activity in heat with heavy sweating accelerates electrolyte loss. Diuretic medications (commonly prescribed for blood pressure and heart failure) cause renal electrolyte wasting and frequently cause foot and leg cramps. Blood tests for electrolytes and kidney function can identify these causes.
Overuse and Fatigue
Prolonged walking or standing, sudden increases in activity, and poorly supported footwear fatigue the intrinsic foot muscles and increase cramping susceptibility. Athletes who increase training volume rapidly—runners adding mileage, hikers tackling longer trails—commonly develop foot cramps during or after activity. Flat feet and high arches increase intrinsic muscle workload: the intrinsic muscles work harder to stabilize a collapsing arch (flat foot) or to provide propulsion in a rigid high-arch foot. Custom orthotics that support the arch reduce intrinsic muscle overwork and can significantly reduce cramp frequency.
Nerve-Related Causes
Peripheral neuropathy—from diabetes, vitamin B12 deficiency, or other causes—can produce cramping along with burning and tingling. The damaged nerves fire abnormally, producing involuntary muscle contractions. Lumbar nerve root compression (sciatica or L4–L5–S1 radiculopathy) can cause cramping in the foot via referred nerve irritation. Tarsal tunnel syndrome (posterior tibial nerve compression at the inner ankle) specifically causes cramping in the plantar foot muscles. If foot cramps are accompanied by burning, tingling, numbness, or weakness, neurological causes should be investigated.
Medications
Many medications cause or worsen muscle cramps as a side effect. Common offenders include: diuretics (furosemide, hydrochlorothiazide), statins (cholesterol medications), beta-blockers, calcium channel blockers, and certain asthma inhalers. If foot cramps began or worsened after starting a new medication, discuss this with your prescribing physician—adjusting the dose, timing, or switching to an alternative medication often resolves the problem.
Immediate Relief for Foot Cramps
During a foot cramp: pull the toes and foot upward (dorsiflexion)—this stretches the plantar flexor muscles and typically breaks the cramp within 30–60 seconds. Walking barefoot on a cool floor activates sensory receptors that help terminate the cramp. Massage the cramping area firmly. For toe cramps—particularly the toes curling downward—pull the affected toes back toward the shin. Applying heat (warm towel or heating pad) after the acute cramp relaxes residual muscle tightness.
Frequently Asked Questions
What deficiency causes foot cramps?
Several nutritional deficiencies can cause foot and leg cramps. Magnesium deficiency is one of the most common—magnesium regulates muscle contraction and nerve conduction, and deficiency increases spontaneous muscle firing. Potassium deficiency (hypokalemia) causes significant muscle cramping and is often medication-induced (diuretics). Calcium deficiency produces muscle irritability and cramps. Vitamin B12 deficiency causes peripheral neuropathy that can manifest as cramping along with burning and tingling. Vitamin D deficiency is associated with muscle weakness and cramps. A blood panel checking these electrolytes, B12, and vitamin D levels can identify correctable deficiencies. Magnesium glycinate or magnesium citrate supplements at 200–400mg daily are often recommended for cramp-prone individuals after ruling out medical causes.
Why do I get foot cramps at night?
Nocturnal (nighttime) foot and leg cramps are extremely common and have several contributing factors. During sleep, the foot naturally plantarflexes (points downward), shortening the calf and plantar foot muscles—this pre-loads the muscles closer to their cramping threshold. Lying still for hours causes reduced circulation and metabolite accumulation in muscle. Dehydration from a day of activity without sufficient fluid intake reaches its nadir overnight. Nighttime cramps that are frequent and severe may indicate electrolyte imbalance, medication side effects, or peripheral neuropathy. Sleeping with a pillow that keeps the foot in neutral (rather than plantarflexed) position and drinking adequate fluids throughout the day can reduce nighttime cramp frequency.
When should I see a doctor for foot cramps?
See a doctor or podiatrist if: foot cramps are frequent (multiple times per week), severe, or prolonged (lasting more than a few minutes); they are accompanied by swelling, redness, or weakness; there is numbness or burning between cramp episodes; they began after starting a new medication; or they are worsening. Cramps associated with exertion that improve with rest may indicate vascular insufficiency (peripheral artery disease) and warrant urgent vascular evaluation. Sudden, severe, new-onset cramps with other symptoms should be evaluated urgently to rule out deep vein thrombosis or vascular causes. Most isolated foot cramps are benign, but a pattern of frequent cramps warrants blood testing to rule out correctable systemic causes.
Medical References & Sources
- PubMed Research — Nocturnal Muscle Cramps Causes and Treatment
- PubMed Research — Magnesium and Muscle Cramps
- American Podiatric Medical Association
📧 Get Dr. Tom’s Free Lab Test Guide
Discover the 5 lab tests every person over 35 should ask their doctor about — explained in plain English by a board-certified physician.
Dr. Tom Biernacki, DPM is a board-certified podiatric surgeon at Balance Foot & Ankle in Howell and Bloomfield Hills, Michigan. He evaluates foot and toe cramps and addresses underlying biomechanical and systemic causes.
Join 950,000+ Learning About Foot Health
Dr. Tom shares honest medical advice, supplement reviews, and treatment guides you won’t find anywhere else.
Subscribe on YouTube →📍 Located in Michigan?
Our board-certified podiatrists treat this condition at two convenient locations. Same-day appointments often available.
Dr. Tom Biernacki, DPM is a double board-certified podiatrist and foot & ankle surgeon at Balance Foot & Ankle Specialists in Southeast Michigan. With over a decade of clinical experience, he specializes in heel pain, bunions, diabetic foot care, sports injuries, and minimally invasive surgery. Dr. Biernacki is a member of the APMA and ACFAS, and his patient education content on MichiganFootDoctors.com and YouTube has reached over one million views.