Stretch the affected leg gently
Flex your foot upward toward your shin
Massage the cramped muscle
Stand and walk slowly
Apply a warm compress or heating pad
Use a cold pack if the muscle feels sore afterward
Drink water
Replenish electrolytes
Eat potassium-rich foods
Eat magnesium-rich foods
Avoid staying in one position for too long
Do light calf and hamstring stretches before bed
Reduce overexertion during exercise
Wear supportive footwear
See a doctor if cramps are frequent, severe, or persistent
