Cramps in the hands and feet usually come from one of a handful of causes: electrolyte imbalances, nerve compression, poor circulation, vitamin deficiencies, or side effects from medication. In most cases, occasional cramping is harmless and resolves on its own. But when cramps become frequent, wake you up at night, or happen alongside numbness or skin changes, they can signal an underlying condition worth investigating.
Electrolyte Imbalances
Your muscles rely on a precise balance of sodium, potassium, calcium, magnesium, and chloride to contract and relax normally. When those minerals drop too low, whether from sweating, not eating enough, or drinking excessive water without replacing salts, your muscles can fire involuntarily and lock up. The hands and feet are especially vulnerable because the small muscles there fatigue more quickly and have less reserve capacity.
Heavy exercise in hot weather is a classic trigger. Sweat carries sodium and smaller amounts of potassium, magnesium, and calcium out of the body, shrinking the fluid space around your cells. That shift makes motor nerves more excitable, which is why a long run or outdoor shift on a summer day often ends with fingers or toes seizing up. Replacing fluids alone isn’t always enough. You need the minerals too.
Vitamin D and Other Deficiencies
Low vitamin D is a surprisingly common contributor to muscle spasms. Blood levels below 30 ng/mL are considered insufficient, and levels below 20 ng/mL qualify as deficient. In documented cases, patients with levels in the low-to-mid 20s experienced recurring muscle tightness, cramps, and numbness that improved once their vitamin D was brought back into the normal range of 30 to 100 ng/mL. Some patients whose levels dipped back down saw their spasms return, reinforcing the connection.
Vitamin B12 deficiency can also cause cramping and tingling, particularly in the hands and feet. B12 is essential for nerve function, and without enough of it, the nerves that control your extremities start to misfire. Vegetarians, older adults, and people with digestive conditions that limit nutrient absorption are at higher risk.
Nerve Compression
When a nerve gets pinched where it passes through a tight space, the muscles it controls can cramp, tingle, or go numb. Two of the most common examples affect the hands and feet directly.
Carpal tunnel syndrome compresses the main nerve running through your wrist, leading to cramping, weakness, and tingling in your fingers. People who do repetitive hand movements, whether typing, assembly work, or gripping tools, are more likely to develop it. Tarsal tunnel syndrome is the equivalent in the foot: the posterior tibial nerve gets squeezed as it passes behind the inner ankle bone. Symptoms include cramping, burning, and tingling along the sole and toes. Diagnosing tarsal tunnel syndrome is tricky because no single test confirms it. Doctors piece together your symptoms, imaging, and nerve conduction studies to make the call.
Poor Circulation
Peripheral artery disease (PAD) narrows the blood vessels in your limbs, and when muscles don’t get enough oxygen-rich blood, they cramp. The hallmark pattern is pain or cramping during activity, like walking or climbing stairs, that goes away within minutes of resting. This is called intermittent claudication. In more advanced cases, cramping and pain can happen even at rest, which signals that blood flow has become critically low.
PAD is more common in smokers, people with diabetes, and those with high blood pressure or cholesterol. The feet are typically affected first because they’re the farthest point from the heart. If your foot cramps come with cool skin, slow-healing sores, or a noticeably weaker pulse in one foot compared to the other, reduced circulation is a likely factor.
Diabetes and Nerve Damage
Chronically high blood sugar damages the small nerves in your extremities over time, a condition called diabetic neuropathy. It usually starts in the feet and can progress to the hands, creating what doctors sometimes call a “stocking and glove” pattern. Symptoms include tingling, pins-and-needles sensations, increased pain sensitivity (especially at night), and involuntary cramping.
The cramping happens because damaged nerves send erratic signals to the muscles they control. Instead of smooth, coordinated contractions, the muscle fibers fire chaotically. Keeping blood sugar well managed slows the progression, but nerve damage that’s already occurred is difficult to reverse.
Kidney Disease
Between 20% and 70% of people with kidney failure report muscle cramps, making it one of the most common complaints in advanced kidney disease. Failing kidneys can’t properly filter waste products from the blood, and these accumulated toxins make muscles more excitable and prone to spasms. The electrolyte disruptions that come with kidney disease, particularly drops in magnesium and calcium, compound the problem. Magnesium supplementation is the most commonly used first-line approach, prescribed by about half of kidney care specialists surveyed in a recent multinational study.
Medications That Trigger Cramping
Several widely prescribed drugs list muscle cramps as a known side effect. Statins, the cholesterol-lowering medications taken by roughly 25 million Americans, cause some form of muscle pain in 5% to 18% of users. Cramping, soreness, and fatigue are the most frequently reported complaints. In rare cases, statins can trigger rapid muscle breakdown, though this is uncommon.
Diuretics, often prescribed for high blood pressure or heart failure, flush sodium, potassium, and magnesium out through urine. That mineral loss can push your electrolyte balance past the tipping point, especially in the hands and feet. If your cramps started or worsened shortly after beginning a new medication, the timing is worth noting and discussing with your prescriber.
Pregnancy
Hand and foot cramps become more common during pregnancy, particularly in the second and third trimesters. The exact mechanism isn’t fully understood, but lower calcium levels in the blood during pregnancy are thought to play a role. The added weight and fluid retention also put pressure on nerves in the wrists and ankles, which may explain why pregnant women frequently develop both carpal tunnel symptoms and foot cramps simultaneously. These cramps tend to be worst at night and typically resolve after delivery.
Dehydration Alone May Not Be Enough
It’s common to hear that dehydration causes cramps, but the relationship is more nuanced than most people think. In controlled studies, subjects who lost 3% of their body mass through sweating, a significant level of dehydration, showed no measurable change in how easily their muscles could be triggered to cramp. The key distinction seems to be that dehydration combined with electrolyte loss and muscle fatigue creates the conditions for cramping, while dehydration on its own, without those other factors, may not be sufficient. So drinking water matters, but replacing minerals matters more.
What to Do When a Cramp Hits
The most effective immediate treatment for a cramp is gentle, sustained stretching of the affected muscle. For a hand cramp, slowly extend your fingers and press them flat against a table or use your other hand to straighten them. For foot cramps, flex your foot by pulling your toes toward your shin, or stand and press the ball of your foot into the floor. Hold the stretch until the spasm releases, which usually takes 15 to 30 seconds.
For prevention, the approach depends on the underlying cause. If your cramps are infrequent and happen after exercise or long days, focus on hydration with electrolyte-containing fluids and make sure your diet includes enough magnesium (found in nuts, seeds, leafy greens, and whole grains), potassium (bananas, potatoes, avocados), and calcium (dairy, fortified plant milks, sardines). If your cramps are persistent, happen at rest, or come with numbness, color changes in your skin, or weakness, the pattern likely points to one of the conditions above that benefits from targeted treatment.

