Nighttime lower leg pain has several common causes, ranging from harmless muscle cramps to circulation problems that deserve medical attention. The type of pain you feel, where exactly it hits, and whether it affects one leg or both can help you narrow down what’s going on. Here’s what’s most likely happening and how to tell the difference.
Nocturnal Leg Cramps
The most common reason your lower legs hurt at night is simple muscle cramping. These sudden, involuntary contractions typically strike the calf and can last from a few seconds to several minutes, leaving soreness that lingers even after the cramp releases. They become more frequent with age and are especially common in adults over 50.
The explanation has to do with your sleeping position. When you’re lying down, your foot naturally points downward, which puts the calf muscle in its most shortened position. In that state, even a small burst of nerve activity can trigger a full cramp. During the day, regular movement keeps the muscle cycling through different lengths, which prevents this. At night, that safeguard disappears.
Several daytime habits make nighttime cramps more likely: sitting for long stretches at a desk, standing on hard floors like concrete, overusing your muscles during intense exercise, or simply having poor posture throughout the day. Dehydration and mineral imbalances also play a role, though the connection is less straightforward than many people assume (more on that below). Stress is another recognized trigger.
Medications That Cause Cramps
A surprisingly long list of common medications can cause or worsen leg cramps as a side effect. These include diuretics (water pills), statins for cholesterol, certain antidepressants like sertraline and fluoxetine, sleep aids like zolpidem, naproxen, gabapentin, pregabalin, and some chemotherapy drugs that cause nerve damage. If your nighttime leg pain started or worsened around the time you began a new medication, that connection is worth exploring with your prescriber.
Why Pain Feels Worse at Night
Even when the underlying cause isn’t cramps, many types of lower leg pain intensify after you get into bed. There are a few reasons for this, and they often work together.
The most widely accepted explanation is called the gate control theory. Your spinal cord acts like a gatekeeper for pain signals traveling to your brain. During the day, constant sensory input from movement, touch, and activity essentially crowds out pain signals and keeps the “gate” partially closed. At night, when you’re lying still in a quiet room, there’s far less competing input, so pain signals pass through more freely. The pain isn’t necessarily getting worse; your brain is just hearing it more clearly.
Your body’s natural pain-suppressing chemistry also shifts overnight. During waking hours, your body produces higher levels of hormones and chemicals that raise your pain threshold. At night, production of these substances drops, which can make the same level of discomfort feel noticeably more intense. Cold bedroom temperatures compound the problem, since lower temperatures worsen most types of nerve-related pain.
Nerve Damage and Neuropathy
If your nighttime pain feels more like burning, tingling, or pins and needles rather than a cramping or aching sensation, peripheral neuropathy is a likely cause. This condition involves damage to the small nerve fibers in your feet and lower legs, and it’s one of the most common reasons for nighttime leg discomfort in people with diabetes or prediabetes.
Neuropathy pain follows the nighttime amplification pattern described above. The lack of movement, the drop in natural pain suppression, and cooler temperatures all combine to make nerve pain feel significantly worse between bedtime and morning. The pain typically starts in the feet and can extend upward into the calves. It often affects both legs symmetrically.
Circulation Problems
Two types of blood vessel problems cause lower leg pain that shows up or worsens at night, and they work in opposite directions.
Peripheral Artery Disease
Peripheral artery disease (PAD) involves narrowed arteries that restrict blood flow to your legs. In earlier stages, it causes pain during walking that goes away with rest. But as the disease progresses, it causes a burning or aching pain even when you’re lying down. This happens because lying flat removes the help that gravity provides in pushing blood down to your legs. A telling sign of PAD rest pain: dangling your legs over the edge of the bed often brings relief, because gravity helps blood reach the affected tissue again. PAD is more common in smokers, people with diabetes, and those with high blood pressure or cholesterol.
Chronic Venous Insufficiency
Chronic venous insufficiency (CVI) is essentially the opposite problem. Instead of not enough blood getting down to your legs, it’s about blood not getting back up to your heart efficiently. Valves inside your leg veins are supposed to prevent blood from flowing backward, but when they’re damaged, blood pools in your lower legs. This raises the pressure inside the veins so much that the tiniest blood vessels can burst. Over time, severe swelling can cause scar tissue that traps fluid in the tissues permanently.
CVI typically causes an achy, heavy, or tired feeling in the legs that worsens after prolonged standing and toward the end of the day. The swelling and discomfort can persist into the night. You might also notice skin discoloration, visible veins near the surface, or in advanced cases, open sores on the lower legs.
The Magnesium Question
If you’ve searched for nighttime leg pain before, you’ve probably seen advice to take magnesium. The evidence is more mixed than most articles suggest. A 2020 systematic review of 11 randomized controlled trials found no reduction in leg cramps from magnesium supplementation across studies involving pregnancy, liver disease, and cramps with no known cause. At four weeks of use, multiple studies totaling 307 participants showed essentially no difference in cramp frequency between magnesium and placebo.
There is one exception worth noting. A randomized, double-blind trial of 184 people found that after 60 days of daily magnesium oxide, cramp frequency dropped from about 5.4 per week to 1.9 per week, compared to a smaller drop in the placebo group. Cramp duration also shortened significantly. The key detail: this benefit only appeared after two months. Short courses under 60 days showed no effect. So if you try magnesium, give it at least two months before deciding whether it’s working, and don’t expect dramatic results.
What Helps With Nighttime Cramps
Stretching your calves before bed is one of the most consistently recommended strategies. Stand facing a wall with one foot behind the other, keep your back heel on the ground, and lean forward until you feel a stretch in the back calf. Hold for 20 to 30 seconds on each side. Doing this nightly can reduce the frequency of cramps by keeping the muscle fibers in a lengthened state before you lie down.
When a cramp strikes, flexing your foot upward (pulling your toes toward your shin) forces the calf to lengthen and can break the cramp faster than waiting it out. Walking around for a few minutes or applying warmth to the area can help with the residual soreness. Staying hydrated throughout the day, especially if you exercise or take diuretics, addresses one of the more straightforward triggers. If you sit for long periods during the day, periodic movement breaks and calf raises can reduce nighttime episodes.
Signs That Need Prompt Attention
Most nighttime lower leg pain is benign, but certain patterns point to something more serious. A deep vein thrombosis (DVT), or blood clot in a leg vein, can cause pain or tenderness in one leg along with swelling on that side only, warmth in the painful area, and skin that looks red or discolored. The key distinguishing feature is that DVT almost always affects just one leg and may cause sudden swelling. This is a medical emergency because the clot can break loose and travel to the lungs.
PAD rest pain, where burning or aching in the lower leg occurs while lying flat and improves when you dangle your feet, also signals advanced disease that needs treatment. Similarly, leg pain accompanied by numbness that’s progressively spreading upward, wounds on your lower legs that won’t heal, or skin that’s becoming dark or hardened deserves medical evaluation rather than home remedies.

