Why Do My Legs Hurt at Night? Causes & Relief

Nighttime leg pain most often comes from muscle cramps, but it can also signal circulation problems, nerve issues, or restless legs syndrome. The cause matters because each condition feels different and responds to different fixes. Here’s how to figure out what’s behind your pain and what you can do about it.

Nocturnal Leg Cramps

The most common reason your legs hurt at night is simple muscle cramping. These involuntary contractions tend to strike in the calf or foot, often waking you from sleep with sudden, intense tightness. You can usually feel the muscle knotted under your skin, and the pain can last anywhere from a few seconds to several minutes.

The current understanding is that nocturnal cramps originate in the spinal cord rather than in the muscle itself. Nerve signals that control muscle contraction become imbalanced: the excitatory signals ramp up while the inhibitory signals that normally keep the muscle relaxed quiet down. This misfiring is more likely when a muscle is shortened or fatigued, which is why cramps tend to hit the calves at night, when your feet naturally point downward and shorten those muscles for hours at a time.

Cramps in the lower legs and feet are especially common in people with age-related nerve changes, and they become more frequent after 50. Dehydration, electrolyte imbalances, and prolonged standing or sitting during the day can all set the stage. Certain medications, particularly diuretics and cholesterol-lowering drugs, also increase the risk.

Stopping a Cramp in Progress

When a cramp hits, flex the affected muscle by straightening your leg and pulling your toes up toward your shin. If you can reach your toes, gently pull them back. Walking around on your heels can also release a calf cramp quickly. After the spasm passes, applying ice wrapped in a towel can reduce lingering soreness, while heat (a warm towel or heating pad) helps relax the muscle if it stays tight.

Restless Legs Syndrome

Restless legs syndrome (RLS) feels fundamentally different from a cramp. Instead of sharp, seizing pain, you feel an uncomfortable, hard-to-describe urge to move your legs. People describe it as crawling, pulling, throbbing, or itching deep inside the leg. The sensation typically starts or worsens when you’re resting, especially in the evening and at night, and moving your legs provides temporary relief.

The International Restless Legs Syndrome Study Group defines the condition by five criteria: a strong urge to move the legs accompanied by uncomfortable sensations, symptoms that begin or worsen at rest, partial relief with movement, a pattern of worsening at night, and no other medical explanation for the symptoms. RLS is linked to how the brain uses iron and the chemical dopamine, which is why it sometimes accompanies iron deficiency or pregnancy. If you notice these symptoms regularly, it’s worth getting your iron levels checked.

Poor Circulation and Vein Problems

Two types of circulation issues can cause nighttime leg pain, and they involve opposite parts of the plumbing.

Peripheral artery disease (PAD) reduces blood flow to the legs because of narrowed arteries. In its milder stages, PAD causes cramping or aching during walking that goes away with rest. But when the disease progresses, pain can occur even while lying down. This “rest pain” typically affects the feet or toes and often feels worse when your legs are elevated, since gravity is no longer helping push blood into already-narrowed vessels. PAD is more common in smokers, people with diabetes, and those with high blood pressure or high cholesterol.

Chronic venous insufficiency (CVI) is the opposite problem. Instead of blood struggling to get down to your legs, it struggles to get back up to your heart. The valves in your leg veins that normally prevent blood from flowing backward become damaged, allowing blood to pool. Your calf muscles act as a “second heart,” squeezing veins with every step to push blood upward. When you’re lying still at night, that pump stops working, and fluid accumulates. CVI typically causes a heavy, achy feeling in the lower legs along with swelling, especially at the end of the day. Elevating your legs above heart level while resting can ease the discomfort significantly.

Nerve Compression From the Spine

Spinal stenosis, a narrowing of the spinal canal in the lower back, can send pain, cramping, or tingling down one or both legs. Bone spurs and herniated discs, which become more common with age, gradually squeeze the nerves branching off the spinal cord. This creates what’s sometimes called “pseudoclaudication” because it mimics the leg pain of artery disease but has a completely different cause.

The distinguishing feature is positional. Spinal stenosis pain typically gets better when you bend forward or sit, because flexing the spine opens up space around the compressed nerves. It gets worse with standing and walking. At night, lying flat can aggravate it because the spine extends slightly, further narrowing the canal. Some people find relief by sleeping with a pillow between or under their knees, which keeps the lower back gently flexed.

Peripheral Neuropathy

Peripheral neuropathy, or damage to the nerves in your legs and feet, produces a distinctive set of sensations: numbness, tingling, burning, or what people often describe as “electrical” pain. Unlike cramps, this pain isn’t tied to a specific activity, time of day, or body position, though many people notice it more at night simply because there are fewer distractions. The pain typically starts in the feet and moves upward over time, following the longest nerves in the body.

Diabetes is the most common cause, but neuropathy can also result from vitamin B12 deficiency, alcohol use, certain medications, and autoimmune conditions. Secondary muscle cramps can develop alongside the nerve pain, particularly in the lower legs and feet, which is why some people with neuropathy experience both burning sensations and cramping.

Red Flags That Need Urgent Attention

Most nighttime leg pain is not dangerous, but a few patterns warrant immediate medical attention. Deep vein thrombosis (DVT), a blood clot in a leg vein, can cause pain, cramping, or soreness that typically starts in one calf. Key warning signs that separate a clot from a simple cramp include swelling in just one leg, skin that’s warm to the touch over the painful area, and a color change (redness or a purple hue). A DVT becomes life-threatening if the clot breaks loose and travels to the lungs, causing sudden shortness of breath, chest pain, dizziness, a rapid pulse, or coughing up blood.

Also worth flagging: leg pain that’s progressively worsening over weeks, pain accompanied by visible skin changes like ulcers or darkening, and any pain severe enough to regularly prevent sleep. These patterns suggest something beyond ordinary cramps.

Simple Steps to Reduce Nighttime Leg Pain

For garden-variety cramps and aching, a few habits make a noticeable difference. Stretching your calves before bed, even for just a minute or two per leg, helps keep the muscles lengthened during sleep. Stay hydrated throughout the day, not just in the evening. If you sit or stand for long stretches at work, take short walking breaks to keep blood circulating and your calf muscle pump active.

Sleeping position matters more than most people realize. Keeping your feet in a neutral position (rather than pointed downward under heavy blankets) reduces the chance of calf cramps. Loosening tucked-in sheets at the foot of the bed gives your feet room to move. For venous insufficiency, elevating your legs on a pillow helps blood return to the heart. For spinal stenosis, a pillow under or between the knees takes pressure off compressed nerves.

If your leg pain happens most nights, keeps you from sleeping, or fits the pattern of any of the conditions above, tracking when it occurs, what it feels like, and what makes it better or worse gives your doctor the clearest picture for figuring out the cause.