
YSK: You can avoid those painful leg cramps in bed (or in general) by quickly and forcefully pointing your toes up and jutting your heel out
Why YSK: Avoiding painful leg cramps is especially useful after a big day of exercise even if you took electrolytes. This method works great when you feel a leg cramp coming on, if you do it fast enough you can avoid it completely. It's become second nature now so even if I'm basically asleep I can still still reflexively do this and avoid a cramp
Edit: while electrolytes, hydration and stretching can greatly reduce leg cramps it is generally regarded as impossible to fully prevent especially after a full day of exercise. Some leg cramps known as idiopathic cramps just happen on their own and appear to occur for no know reason.