Leg Cramps at Night: Causes, Warning Signs and Useful Blood Tests

The essentials
Night leg cramps are sudden, painful knots in the calf or foot. Most are harmless; age, tired muscles, pregnancy and some medicines make them more likely. Blood tests help when cramps are new and frequent, follow a new medicine, or come with weakness, numbness or swelling.
Between 50% and 60% of adults report night leg cramps. An episode lasts about nine minutes on average, and the muscle can stay sore for up to a day[1][2]. Many people call it a "charley horse".
When are leg cramps at night a reason to worry?
When to see a doctor
- Emergency: call 911 for leg pain with chest pain or sudden breathlessness (possible clot in the lungs), fainting or an irregular heartbeat with weakness (possible very low potassium), or severe muscle pain with cola-colored urine[9][11][12].
- Within 24 hours if one calf stays swollen, warm, red or tender after the cramp has passed: this is not a cramp and may be a deep vein thrombosis[12].
- At your next appointment if cramps disturb your sleep, last longer than 10 minutes, come with numbness or swelling in the legs, or began after a new medicine[2][4].
What causes leg cramps at night? Everyday triggers first
Often no cause is found. One theory: overactive nerve signals reach a calf muscle already shortened because the foot points down in bed[1].
- Common Age. Cramps grow more common with age[1][2].
- Common Tired muscles. Unusual effort, worse in hot or humid weather[1][2].
- Common Pregnancy, mostly in the later months[2].
- Common Medicines. In a Canadian database study of adults 50 and older, cramp treatment was 2.4 times more likely in the year after starting a long-acting asthma inhaler, 2.1 times after a potassium-sparing diuretic and 1.5 times after a thiazide-type diuretic; the statin link was small[4]. Intravenous iron, raloxifene, estrogens, naproxen and teriparatide are also linked[1]. Never stop a medicine without asking the prescriber.
- Possible Fluid loss. Dehydration during exercise can trigger cramps[3], although studies of night cramps found no clear link with fluid or salt balance[1].
Which conditions are linked to night leg cramps?
- Possible Blood vessel problems. Leg cramps were reported by 75% of veterans with peripheral artery disease; weak leg veins are linked too[1].
- Possible Liver and kidney disease. About 60% of people with cirrhosis have cramps; dialysis is a known trigger[1].
- Possible Nerve problems. Neuropathy from diabetes, low vitamin B12 or alcohol, lumbar spinal stenosis, Parkinson's disease[1].
- Possible Mineral or hormone imbalance. Low potassium, low magnesium or low calcium can cause spasms and cramps[3][9][10]; so can an underactive thyroid and alcohol use disorder[3].
- Rare Nerve or muscle disease. Cramps with weakness, muscle wasting or spreading twitches: see muscle twitching warning signs.
Cramp, restless legs or poor circulation?
A cramp is a hard knot with sharp pain. Restless legs syndrome is an evening urge to move the legs, eased by moving, with no tight muscle. Calf pain while walking that stops after a few minutes of rest points to narrowed arteries (claudication)[1][12]. Tingling and "electric" pain suggest a nerve problem[1].
Do you need blood tests for leg cramps at night?
Not always. Your story and an exam make the diagnosis: studies found no proven link between night cramps and electrolytes, anemia, glucose, thyroid or kidney results[1]. Tests are chosen when your history points to a cause[1][3].
| Test | Worth doing when | What it can change |
|---|---|---|
| Potassium (in a basic metabolic panel) | Water pills, vomiting, diarrhea, weakness | Potassium supplement or a different diuretic |
| Magnesium | Diuretics, alcohol, chronic diarrhea, low potassium | Treating a real deficiency |
| Calcium (± vitamin D) | Low magnesium, kidney disease, little sun or poor diet | Looking for a parathyroid or vitamin D problem |
| Creatinine and eGFR | Kidney disease, abnormal electrolytes | Checking how the kidneys handle minerals |
| CK (creatine kinase) | Muscle pain or weakness, statins, dark urine | Spotting muscle damage |
| TSH | Tiredness, feeling cold, weight gain | Treating an underactive thyroid |
| Glucose, vitamin B12 | Numb or burning feet | Finding the cause of nerve damage |
| Liver tests | Heavy drinking, known liver disease | Recognizing cirrhosis |
For pain on walking, the first test is the ankle-brachial index (blood pressure at ankle versus arm)[1].
How do I read my results?
| Test | Result | Reference range | Flag |
|---|---|---|---|
| Potassium | 3.2 mEq/L | 3.5-5.1 mEq/L | L |
| Magnesium | 1.6 mg/dL | 1.7-2.2 mg/dL | L |
| Calcium, total | 9.4 mg/dL | 8.6-10.3 mg/dL | |
| eGFR | 72 mL/min/1.73 m² | ≥60 | |
| CK, total | 110 U/L | 26-192 U/L |
BloodSense explains your whole report line by line, in plain words, so you know what to ask your doctor.
Explain my resultsMinerals and CK
A small drop in potassium may cause spasms or nothing; a large drop can disturb the heart rhythm[9]. Low magnesium comes from alcohol, chronic diarrhea, diuretics, acid-reducing pills (PPIs) and uncontrolled diabetes[10]. Low calcium can reflect low vitamin D or magnesium, low blood protein or the parathyroid glands[11]. These often come together on an electrolyte panel. CK rises with muscle damage, and also after hard exercise or alcohol in the days before the test[11]. Very high CK with dark urine means rhabdomyolysis. A fully normal report is the usual result[1].
What helps, and what does not?
During a cramp, stretch or massage the calf, or stand on the leg[2]. In a trial of 80 adults over 55, calf and hamstring stretches each night before bed cut cramps by about 1.2 per night after six weeks[7]. Magnesium tablets are unlikely to help older adults with ordinary cramps[5]. Quinine helps a little but has serious side effects, so it is not for routine use[6].
What should I note before the appointment?
- How often, how long, which muscle
- Calf pain when walking that stops with rest; numbness or burning feet
- All medicines with start dates: water pills, inhalers, statins, hormones
- Alcohol, vomiting or diarrhea, new sport, pregnancy
Questions to ask your doctor
- Could one of my medicines be causing the cramps?
- Is a blood test useful in my case, or is the exam enough?
- Should my circulation or nerves be checked?
Frequently asked questions
What deficiency causes leg cramps at night?
Usually none: most people with night cramps have normal mineral levels[1]. A blood test is worth it with a risk factor, such as a diuretic.
Are leg cramps at night a sign of something serious?
Rarely. Most are harmless and have no cause[2]. Get checked if they come with weakness, numbness, a swollen calf, or calf pain on walking[1].
What helps leg cramps in pregnancy?
Stretching first. Trials of magnesium, calcium and vitamins in pregnancy were small and unclear[8]; ask before taking a supplement.
Can statins cause leg cramps?
The link is small[4]. Aching, weak muscles or dark urine on a statin call for a CK test[11].
Related tests and guides
- Magnesium blood testHow to read a low or high magnesium.
- Potassium blood testWhat a low potassium means for muscles and heart.
- Restless legs syndromeThe urge to move, and why ferritin matters.
- Swollen ankles and feetWhen leg swelling needs tests.
References
- Allen RE, Kirby KA. Nocturnal leg cramps. Am Fam Physician. 2012;86(4):350-355. aafp.org (accessed November 12, 2026)
- NHS. Leg cramps. nhs.uk (accessed November 12, 2026)
- MedlinePlus Medical Encyclopedia. Muscle cramps. medlineplus.gov (accessed November 12, 2026)
- Garrison SR, Dormuth CR, Morrow RL, et al. Nocturnal leg cramps and prescription use that precedes them: a sequence symmetry analysis. Arch Intern Med. 2012;172(2):120-126. doi:10.1001/archinternmed.2011.1029 (accessed November 12, 2026)
- Garrison SR, Korownyk CS, Kolber MR, et al. Magnesium for skeletal muscle cramps. Cochrane Database Syst Rev. 2020;9(9):CD009402. doi:10.1002/14651858.CD009402.pub3 (accessed November 12, 2026)
- Katzberg HD, Khan AH, So YT. Assessment: symptomatic treatment for muscle cramps (an evidence-based review). Neurology. 2010;74(8):691-696. doi:10.1212/WNL.0b013e3181d0ccca (accessed November 12, 2026)
- Hallegraeff JM, van der Schans CP, de Ruiter R, et al. Stretching before sleep reduces the frequency and severity of nocturnal leg cramps in older adults: a randomised trial. J Physiother. 2012;58(1):17-22. doi:10.1016/S1836-9553(12)70068-1 (accessed November 12, 2026)
- Luo L, Zhou K, Zhang J, et al. Interventions for leg cramps in pregnancy. Cochrane Database Syst Rev. 2020;12(12):CD010655. doi:10.1002/14651858.CD010655.pub3 (accessed November 12, 2026)
- MedlinePlus Medical Encyclopedia. Low blood potassium. medlineplus.gov (accessed November 12, 2026)
- MedlinePlus Medical Encyclopedia. Magnesium blood test; Low blood magnesium. medlineplus.gov, medlineplus.gov (accessed November 12, 2026)
- MedlinePlus Lab Tests. Calcium blood test; Creatine kinase (CK). medlineplus.gov, medlineplus.gov (accessed November 12, 2026)
- MedlinePlus Medical Encyclopedia. Peripheral artery disease of the legs; Deep venous thrombosis. medlineplus.gov, medlineplus.gov (accessed November 12, 2026)
This article is general health information. It does not replace a medical examination, diagnosis or treatment. Do not stop or change a medicine, or start a supplement, without talking to your doctor or pharmacist.



