Try standing on a cold surface, which can sometimes stop a spasm. Or relieve leg pain during pregnancy by straightening your leg and gently flexing your ankle and toes back toward your shins several times. If either of these techniques works, you can try a prenatal massage or add local heat for added relief, but don't massage or add heat if neither flexing nor cold helps the situation.