Dehydration is one of the most common causes of muscle cramps. When your body lacks enough fluids, your muscles are more likely to contract and spasm. Drinking a glass of water an hour before bed can help keep your muscles hydrated and functioning properly during the night. Be mindful not to drink too much right before sleep to avoid waking up for bathroom trips.
2. Electrolyte Water or Coconut Water

Sometimes water alone isn’t enough—especially if you’ve been sweating heavily during the day or after a workout. In such cases, your body may be low in electrolytes like potassium, magnesium, calcium, and sodium. Coconut water is a natural source of these minerals and is a great bedtime drink. You can also try electrolyte-enhanced water or tablets if you need a boost.
3. Chamomile Tea with Magnesium
Chamomile tea is known for its relaxing effects, but adding a little magnesium powder or supplement to it can double its benefits. Magnesium plays a vital role in muscle function and helps prevent cramps. Drinking a warm cup of chamomile tea with added magnesium before bed can calm your nerves, improve sleep, and reduce the chances of leg cramps.