Magnesium supplements really helped a lot. Later on, stretching lots and lots of stretching. Now a massage gun. Cramps are a thing of the past.I used to let the leg contract and curl up powering through the cramp pain until it subsided but a few times it lasted over a minute which is agonizing.
I used to have to get out of bed and stand on it before I discovered the other trick.
The trick to pull the tip of my foot backwards really helped a lot because then I don't have to try to stand or anything.
I've never had a cramp like that in water, thankfully.
if you do that in the water, you sink. by the time you realize that this was a bad idea it's to late. i can imagine that the pain would distract me to much to be able to focus and use my arms to keep me afloat. never mind that i'd probably also not think about taking a deep breath to get enough air before sinking.
Anyway maybe that's something that can be trained?
(btw, this is not a humblebrag. I'm dumb enough that I almost drowned at least once and it was 100% just being dumb. Just nothing to do with cramps.)
Edit: I realised you can feel cramps coming by speaking with a friend who's a bodybuilder. He related a story where he felt a cramp coming in the middle of a set of squats and thankfully recognised it in time to place the bar on the hooks. When I first started having cramps I paid attention and you can actually feel the muscle tensing up so there's time to react to it, although I don't know how you can avoid the tearing pain. I only know to try and unlock the muscle by pushing the other way and massaging it.
Edit 2: Oh, er. There's menstrual cramps of course. I'm lucky not to get those. I don't think you can "push the other way" with them. Ugh.