My friend Charlie is back....

https://slrpnk.net/post/35738966

This fixes it instantly every time for me. Ignore everybody else. When you get that cramp start moving our foot in the opposite direction pointing your toes towards your knees and stretch out the back of your ankle. Instant cramp relief everytime.

If you have cramping often like this then maybe dedicate yourself to some hamstring stretches.

This is how you fix a cramp scuba diving - grab the tips of your fins and pull up. Same effect. Works for me too.
…and learn better finning technique.