Magnesium is what they say you need when you have these, but my tried and true method is simple and works every time for me, as soon as you feel the cramp starting, not once it's in full swing because by then it's too late, stretch your foot up and point your toes up as high as you can, it stops my cramps every single time, other than that nothing has ever stopped them for me and it's something I've had in every pregnancy.