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.

I once tried it and got a second more agonising cramp
That’s fair. Everybody’s body is a bit different I suppose. I would totally be doing more stretches in your case though.
Yeah, I’ve neglected physical health too much recently
So like one a day?