Leg cramps are sudden and painful muscle contractions in the calves, thighs or feet. They often occur at night or during physical activity, and can last for a few seconds or up to 15 minutes. They are caused by dehydration, electrolyte imbalances, muscle fatigue or overuse, or a lack of magnesium or calcium. Symptoms can range from mild to severe, and may include aching, burning, or throbbing pain, and tightness or stiffness in the affected muscle.