Side effects of medications
Certain medications, such as diuretics, statins, or beta-blockers, are known to increase the likelihood of cramps. If you are taking these types of medications, it is advisable to discuss this with your doctor.

Practical tips to prevent nighttime cramps
Stay hydrated.
Drink water throughout the day, not just when you're thirsty. In hot weather or during physical exertion, supplement with electrolyte-rich drinks to maintain mineral balance.
Adopt gentle stretching techniques
Before going to bed, take a few minutes to stretch your calves, thighs, and feet. A short yoga session or light movements will help release muscle tension.
Take care of your sleeping posture
Avoid sleeping with your feet stretched out. Keep them in a neutral position: place a cushion under your ankles to maintain a comfortable angle.
Massage your legs and apply heat
A gentle massage or a warm towel placed on the muscles before bedtime promotes relaxation and reduces the risk of spasms.