A week or 2 of doing calf raises/stretches on a step for rid of calf cramps for me. If they ever start to return, it's when I've stopped doing my leg calisthenics.
It may not be what everybody wants to hear, but strength work has solved nearly every ache and pain I've had, from back, hip, knees, shoulders, and even cramps.
Lunges, squats, and single-leg deadlifts have all but gotten rid of hamstring cramps as well.