Nighttime leg pain is extremely common, affecting up to 60% of adults at some point. About three out of four cases of leg cramps specifically happen at night. The reasons range from simple muscle fatigue and dehydration to circulation problems and nerve damage, and understanding the pattern of your pain is the key to figuring out which cause applies to you.
Why Pain Gets Worse at Night
Your body’s internal clock directly influences how intensely you feel pain. Researchers at the University of Science and Technology of China mapped a neural pathway connecting the brain’s master clock to the spinal cord. During rest periods, this clock is highly active, amplifying pain signals through the spinal cord. During active periods, it dials those signals down. So pain that simmers in the background while you’re busy during the day becomes hard to ignore once you’re lying still in bed.
There’s also a practical factor: distraction disappears. When you’re walking, working, or watching TV, your brain filters out low-level discomfort. In a quiet, dark room with nothing else competing for your attention, every ache registers more sharply.
Nocturnal Leg Cramps
The most common form of nighttime leg pain is the sudden, involuntary cramp, usually in the calf, that jolts you awake. About 30% of adults experience these at least five times per month, and 6% deal with them 15 or more times per month. The risk increases with age and during pregnancy.
These cramps originate from hyperactive nerve firing in the lower motor neurons, essentially your nerves sending rapid, involuntary signals that lock the muscle into a painful contraction. Muscle fatigue is considered a primary trigger. If you were on your feet all day, or conversely if you’ve been sedentary for long stretches, both patterns can set the stage for cramps once you settle into bed.
Other well-established triggers include dehydration, low mineral levels (particularly potassium and magnesium), and several categories of medication. Diuretics, cholesterol-lowering drugs, blood pressure medications, oral contraceptives, and even stimulants like caffeine can increase your likelihood of nighttime cramps. If you started a new medication and noticed cramps appearing or worsening, the timing is worth noting.
Underlying conditions that cause cramps include chronic kidney disease, thyroid disorders (both overactive and underactive), diabetes, anemia, and liver cirrhosis. For most people, though, cramps are idiopathic, meaning no specific disease is driving them.
Restless Legs Syndrome
Restless legs syndrome (RLS) is often confused with leg cramps, but the two feel quite different. RLS creates an uncomfortable urge to move your legs, often described as crawling, tingling, or pulling sensations deep in the legs. It’s not typically painful in the way a cramp is. The discomfort builds when you’re still and eases the moment you get up and move. Symptoms also tend to last longer than a cramp, sometimes persisting for hours.
The underlying mechanism involves dopamine, the brain chemical responsible for smooth, controlled movement. Iron plays a critical role here because it’s a necessary ingredient at the rate-limiting step in dopamine production. When iron levels in the brain are low, dopamine signaling goes haywire. This is why RLS is strongly linked to iron deficiency, and why a simple blood test checking your ferritin level is one of the first things to investigate if you suspect RLS.
Circulation Problems
Two vascular conditions commonly cause leg pain that worsens at night, and they affect opposite sides of the plumbing.
Peripheral Artery Disease
Peripheral artery disease (PAD) involves narrowed arteries that can’t deliver enough blood to your legs. In earlier stages, this causes pain during walking that goes away with rest. But as PAD progresses, you can develop what’s called rest pain: a burning or aching sensation in your legs, feet, or toes that appears specifically when you’re lying flat. This happens because gravity is no longer helping push blood down to your feet. Many people with this type of pain find that dangling their legs over the edge of the bed provides some relief, since it recruits gravity to improve flow.
Chronic Venous Insufficiency
Venous insufficiency is the opposite problem. The valves in your leg veins that push blood back up toward your heart become damaged, allowing blood to pool in your lower legs. This creates a heavy, achy, full feeling along with swelling that’s usually worst at the end of the day. Nighttime cramping is a recognized symptom. The swelling and pressure from a full day of pooled blood peaks right around bedtime.
A clue that circulation is involved: PAD pain improves when your legs hang down, while venous insufficiency tends to improve when you elevate your legs.
Nerve Damage
Peripheral neuropathy, particularly a form called small fiber neuropathy, causes burning, stinging, or shooting pain that characteristically worsens at night and often disrupts sleep. This type of nerve damage affects the smallest nerve fibers in your skin and is commonly caused by diabetes, though it can also result from autoimmune conditions, vitamin deficiencies, or alcohol use disorder.
Small fiber neuropathy is easy to miss because standard nerve conduction tests come back normal. The damaged fibers are too small to show up on routine testing. Diagnosis typically requires a skin biopsy to count the nerve fiber density, which means you may need to specifically ask about this possibility if your symptoms fit but initial tests are unreassuring. The pain typically starts in the feet and can spread upward over time.
What Helps With Nighttime Cramps
For the most common cause, nocturnal leg cramps, a few practical strategies have good evidence behind them. Stretching your calves before bed is the most consistently recommended first step. A simple wall stretch, where you lean into a wall with one foot back and the heel pressed to the floor, held for 30 seconds per leg, targets the muscles most prone to cramping.
Staying hydrated throughout the day matters more than drinking a glass of water right before bed. If you’re taking diuretics or sweating heavily, your electrolyte balance may need attention as well.
A 2024 randomized trial published in JAMA Internal Medicine found that vitamin K2 (specifically the menaquinone-7 form), taken as 180 micrograms in the evening, cut the average number of weekly cramps roughly in half in adults 65 and older. Over two months, the treatment group experienced more than 21 fewer cramp episodes compared to placebo. It’s available over the counter with few side effects, though it should not be taken by anyone on warfarin, since it can reduce the drug’s effectiveness.
For RLS, checking and correcting iron levels is the most important first step. If iron stores are adequate and symptoms persist, treatments that target dopamine activity in the brain are the standard approach.
Warning Signs That Need Attention
Most nighttime leg pain is benign and manageable. But certain patterns suggest something more serious is going on:
- Pain that’s increasing in severity over days or weeks, rather than staying stable
- One-sided swelling, redness, or warmth in a leg, which can indicate a blood clot
- Pain that doesn’t improve with stretching, massage, or over-the-counter pain relief
- Sores on your feet or legs that won’t heal, which can signal severe PAD
- Pain accompanied by limping, inability to bear weight, or significant limitation of activity
- Nighttime leg pain paired with unexplained weight loss, fever, or night sweats
Rest pain from PAD, in particular, represents an advanced stage of arterial disease that needs prompt evaluation, since it can progress to tissue damage if blood flow isn’t restored.

