In my mid fifties, I started to get agonizing leg cramps in my calves and feet at night. I tried different remedies but could not eliminate them. I like to watch Korean Dramas, so I tried eating the Korean staple food, kimchi for fun. I noticed that when I ate a little kimchi, I did not get leg cramps.
Now I just eat two mouthfuls of kimchi each day and I am leg cramp free. Works like a miracle for me. Kimchi is very hot and spicy so you need to eat it, like you would a relish, with something. You can eat it with rice, eggs, meat, fish, tofu, or chicken or whatever, at any time of the day. Kimchi is is usually made with cabbage fermented with hot pepper. It is very high in nutrients, and can be easily absorbed in the stomach. I don't know why it works, it just does.
If you have leg cramps at nighttime, while trying to sleep, keep a salt shaker on your nightstand.