Massage and Acupuncture
Both deep tissue massages and acupuncture have been proven to help relax muscles and reduce the frequency of cramps. You might want to explore these therapies as part of your strategy to prevent cramps.

Epsom Salt Baths
Epsom salt contains magnesium, which helps relax muscles and reduce cramping. Soaking in a warm bath with Epsom salt can be soothing, and for quicker relief, you can massage the affected muscle with the salt to boost relaxation and circulation.
Increase Magnesium Intake
Magnesium is essential for muscle relaxation. If nighttime cramps are a frequent issue, try adding more magnesium-rich foods to your diet, such as plums, dried fruits, nuts, avocados, and seeds. Another option is to make your own magnesium oil by boiling half a cup of water, mixing it with half a cup of magnesium oil, and simmering it until the liquid reduces. After it cools, transfer it to a spray bottle for easy application on your muscles.
By following these simple steps, you can relieve nighttime leg cramps and improve your sleep quality. If your cramps continue or worsen, be sure to consult a healthcare professional.