OMG, pregnancy leg cramps are the absolute worst! I get them all the time.
I usually would flex my foot and toes towards my head and it would go away, that was pre pregnancy, lol. Although flexing that direction does still help sometimes I've found that flexing the other direction helps a lot too. As in pointing your toes outward it make your foot parallel with your leg. The other thing that helps to prevent or take them away (if done during cramp) but for prevention, prior to getting in bed stand a foot or two away from a wall facing it. Keep your feet flat on the ground with your hands planted on the wall and lean forward leaving your feet flat on the ground. Do this like 10-15 times in and out, like a standing push up. Oh, you should be able to feel your calf muscles stretching/flexing when you lean into the wall. Very simple but it does wonders. I'm sure I look really attractive hobbling around yelling and screaming and doing crazy things whilst 8 months pregnant, lol, but I'd much rather not get them at all! He he