Does this only occur during high impact exercise?
Does is occur when you are walking?
The reason I was asking you those questions is related to a claudication syndrome. This is where the artery does not supply enough blood to the area with increased muscle use. Usually, by the time we see the patient is when they are hurting with even walking and it goes away at rest. Since this only occurs when you are into heavy exercise, it is less likely that this would be the cause. However, please have your physician check the pulses in your feet and the blood pressure in your ankles to see, at the very least it will help you with a baseline measurements later down the road.
What helps muscle cramps is to warm up your muscles and stretch BEFORE you fully exercise, You don't want to just stretch with "cold" muscles, you want to walk for 5-10 minutes then stretch then go into your higher impact routine.