A sharp pain, a muscle that suddenly tightens, often in the middle of the night or during exertion: cramp is an experience that almost everyone knows. Most often in the calf or foot, it is as dramatic as it is harmless in the vast majority of cases.
Where do crampscome from, particularly nighttime cramps ? How to relieve them in the moment, and most importantly how to prevent them? This guide covers the causes, best practices, and the real role of hydration and magnesium, without exaggerated claims.
A cramp is an involuntary, sudden and painful muscle contraction, especially in the calf and foot. Nighttime cramps are common, particularly among elderly people and pregnant women. Usual causes: prolonged lying position, insufficient hydration, mineral imbalance, age, certain medications. To relieve : stretch the muscle, get up and walk, massage, apply heat. To prevent : stay well hydrated, stretch your calves, eat a diet rich in magnesium and potassium. Magnesium contributes to normal muscle function, but its effectiveness against cramps is mixed according to studies. Frequent or unusual cramps warrant medical advice.
What is a Cramp?
A cramp is an involuntary, sudden and intense contraction of a muscle or group of muscles, which does not relax immediately. The muscle becomes hard, visible under the skin, and the pain can be sharp. The areas most affected are the calf, the foot and the back of the thigh, but a cramp can occur almost anywhere.
Physiologically, the muscle receives a contraction signal that it can no longer interrupt: the reflex arc that controls relaxation is overwhelmed. The contraction sustains itself for a few moments, then subsides, often by stretching the muscle. Once the cramp passes, the muscle may remain tender for several hours.
Important: a cramp is not muscle soreness. Muscle soreness is a diffuse and delayed pain that appears 1 to 2 days after unusual exertion (micro-tears). A cramp, on the other hand, is immediate and sudden. If you're looking to recover after exercise instead, see our dedicated guide on recovering from muscle soreness.
Night Cramps: Why at Night?
<<<33>>> Night cramps crampes nocturnes are among the most common and most bothersome: they wake you with a start, often with a calfcramp. They affect everyone, but especially older adults, pregnant women and sedentary individuals.
Why at night? Several explanations combine:
- The lying position often points the foot downward, which keeps the calf in a shortened position: a muscle already contracted is easier to "cramp".
- Prolongedimmobility slows circulation and drainage.
- The drop in body temperature and nocturnal metabolic variations can make nerves more sensitive.
- Tight bed sheets on the feet accentuate the downward flexion of the foot.
Good news: these factors are largely modifiable, which explains why simple preventive measures (see below) often significantly reduce the frequency of episodes.
The most common causes
In the majority of cases, the cramp is idiopathic : without any identifiable precise cause, simply the result of several favoring factors. The most common:
Alcoholand excessive coffee consumption can also promote cramps, partly through dehydration. In athletes, exercise-related cramps are often linked to neuromuscular fatigue and losses of water and salts through sweat. peuvent également favoriser les crampes, en partie via la déshydratation. Chez le sportif, la crampe d'effort est souvent liée à la fatigue neuromusculaire et aux pertes en eau et en sels par la sueur.
When a cramp hides a medical problem
The question " what disease causes cramps " comes up often, and it needs to be clear: in the vast majority of cases, an occasional cramp is not a sign of any disease. But when cramps become frequent, very painful, or are accompanied by other symptoms, certain causes warrant investigation by a doctor:
- Circulatory disorders : venous insufficiency, lower limb arteriopathy.
- Metabolic diseases : diabetes, thyroid disorders.
- Kidney failure or marked electrolyte imbalances.
- Neuromuscular diseases (rarer).
- Medications : diuretics, statins, certain blood pressure or asthma treatments.
- Pregnancy : leg cramps are common, especially in the 3rd trimester.
Consult a doctor if: cramps are very frequent or worsening, wake you every night, are accompanied by limb swelling, muscle weakness, numbness, persistent pain after the cramp, or if they started after beginning a new medication. During pregnancy, seek advice before any supplementation.
What to do when a cramp occurs
At the moment, the goal is simple: force the contracted muscle to lengthen to break the contraction. Here are the steps, in order.
Actions to stop a cramp
To do as soon as a cramp occurs, especially in the calf
After the episode, the muscle may remain tender: avoid intense use immediately afterward, stay hydrated, and stretch it gently.
How to prevent cramps
Prevention is where we gain the most. A few simple habits often significantly reduce the frequency of cramps.
Stay properly hydrated
Drink water regularly throughout the day (clear urine color is a good indicator). Hydration supports proper muscle function. Increase your intake in case of heat or physical effort.
Stretch your calves
Gentle calf stretches, especially in the evening before bed, help prevent nighttime cramps. Hold each stretch for 20 to 30 seconds, without jerking movements.
A mineral-rich diet
Focus on foods rich in magnesium (leafy greens, dried fruits, nuts and seeds, dark chocolate, legumes) and potassium (banana, vegetables, potato). These minerals contribute to the balance of muscle contraction.
Limit coffee and alcohol, stay active
Excess coffee and alcohol promotes dehydration. Regular, gentle physical activity maintains muscle flexibility. For nighttime cramps, avoid sheets that are too tight on your feet and slightly elevate your legs.
The role of magnesium and minerals
Magnesium is the mineral most associated with cramps, and for good physiological reasons: it plays a role in muscle contraction and relaxation and in nerve transmission. As such, it contributes to normal muscle function and helps reduce fatigue (claims recognized by EFSA). Yet intakes are often insufficient: part of the French population consumes less than nutritional reference values (ANSES). Should we expect miracles from it then? Let's be honest, that's what builds confidence. According to PubMed, a Cochrane meta-analysis by Garrison and collaborators 2020 concludes that, in
older adults suffering from idiopathic cramps (the most common case of nighttime cramps), magnesium supplementation does not provide clearly demonstrated benefit compared to placebo ( DOI: 10.1002/14651858.CD009402.pub3). The same review notes that, inpregnant women , results are contradictory.But the story doesn't end there, because
the form of magnesium and its absorption matter . Again according to PubMed, a randomized controlled trial by Barna and collaborators 2021, published in Nutrition Journal, showed that a form of magnesium. Toujours selon PubMed, un essai randomisé contrôlé de Barna et collaborateurs 2021, publié dans Nutrition Journal, a montré qu'une forme de magnésium à improved cellular absorption significantly reduced the frequency and duration of nocturnal leg cramps, and improved sleep quality, compared to placebo (DOI: 10.1186/s12937-021-00747-9).
Key takeaways? Magnesium is a relevant support, especially in case of insufficient intake, and bioavailability is decisive. This is precisely the logic behind our Magnesium+, formulated with microencapsulated magnesium MagShape® and magnesium malate, renowned for their good bioavailability and digestive tolerance, combined with vitamin B6 and taurine, ideally to be taken in the evening. It is part of a comprehensive approach (hydration, stretching, nutrition), not as a replacement for them. For an overview of common deficiencies, see our article on the most frequent deficiencies.
Frequently Asked Questions
What causes leg cramps at night?
Nocturnal leg cramps are involuntary muscle contractions, most often in the calf or foot, that occur during sleep. Their causes are multiple and often combined: the lying position which shortens the calf, immobility, insufficient hydration, an imbalance in minerals (magnesium, potassium, calcium), age, pregnancy, certain medications or impaired circulation. In the majority of cases, they are harmless.
How to relieve a cramp quickly?
The most effective action is to gently stretch the contracted muscle. For a calf cramp, pull your toes toward you with your leg extended, or press the sole of your foot to the ground while stretching your leg. Getting up and walking a few steps, massaging the area and applying heat also help relax the muscle. The cramp usually subsides within a few seconds to a few minutes.
Is magnesium effective against cramps?
Magnesium contributes to normal muscle function and muscle relaxation after contraction. But the evidence for its effectiveness against cramps is nuanced: according to a Cochrane meta-analysis, magnesium provides no clearly demonstrated benefit in elderly people with idiopathic cramps, while it remains relevant in cases of proven deficiency, pregnancy or depending on the form and bioavailability of magnesium. A course may help, especially if intake is insufficient.
What disease can cause cramps?
Most cramps are harmless and have no underlying cause. But frequent, intense or unusual cramps can sometimes be linked to a medical condition: circulatory disorder (arteriopathy, venous insufficiency), diabetes, kidney failure, thyroid disorders, neuromuscular diseases, or be a side effect of certain medications (diuretics, statins). If you experience repeated cramps or cramps associated with other symptoms, consult a doctor to identify the cause.
How to prevent cramps?
To prevent cramps: drink enough water throughout the day, stretch your calves regularly and before bed, eat a diet rich in magnesium and potassium (leafy greens, dried fruits, banana, legumes), avoid excess coffee and alcohol, and maintain regular physical activity. For nocturnal cramps, slightly elevating the feet and avoiding sheets that are too tight around the feet can help.
Learn More
- Cramp
- Involuntary, sudden and painful muscle contraction that lasts from a few seconds to a few minutes.
- Nocturnal cramp
- Cramp occurring during sleep, most often in the calf or foot. Common in elderly people and pregnant women.
- Idiopathic
- Refers to a disorder with no identifiable precise cause. Most cramps are idiopathic.
- Magnesium
- Mineral involved in muscle contraction and relaxation and nerve transmission. Contributes to normal muscle function.
- Microencapsulated magnesium (MagShape®)
- Form of magnesium coated with a fine protective capsule, designed for optimal bioavailability and digestive tolerance.
- Electrolytes
- Charged minerals (sodium, potassium, magnesium, calcium) that regulate, among other things, muscle contraction and hydration.
- 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
- Barna O, Lohoida P, Holovchenko Y, et al. A randomized, double-blind, placebo-controlled, multicenter study assessing the efficacy of magnesium oxide monohydrate in the treatment of nocturnal leg cramps. Nutr J. 2021;20(1):90. doi:10.1186/s12937-021-00747-9
- EFSA Panel on Dietetic Products, Nutrition and Allergies. Authorized health claims related to magnesium (normal muscle function, normal nerve function, reduction of fatigue). EFSA Journal.
- ANSES. Nutritional reference values for magnesium and potassium.
About this article. Written by the Nutrition•pro team based on references from ANSES and EFSA and publications indexed on PubMed (including a Cochrane meta-analysis). This article is informational and does not replace medical advice. In case of frequent or unusual cramps, and before any supplementation during pregnancy, consult a healthcare professional. Discover our editorial methodology.







