You're not alone - I get them, too. The foot cramps, which tighten up my arches, are bad enough - but like you, the hamstring cramps are the worst.

I've not been able to isolate any pattern, and they don't happen every time. Like you, they tend to come when I'm most relaxed, and then move my legs quickly.

Still a small price to pay - I'd rather get a hamstring cramp in my tent, than not get one in my living room.