A cramp can be quickly defused with active stretching of the affected muscle. Cramps in the calf muscle can be defused by outstretching the leg, pushing the heel downward, and pointing your toes toward your head.
Standing up with most of your weight on the ball of the foot on the cramping side will also stretch the gastrocnemius muscle and diffuse the pain. If you feel a cramp starting, this will usually stop it from becoming more painful.
Recent studies have shown that the resulting tightness and contractions that sometimes ensue can be lessened by maintaining the knee in a fully bent position for the first 24 hours to prevent the involved muscles from going into spasm.
It appears that you may have had some kind of internal injury like a muscle tear, strain or a nerve compression in the foot and ankle region.If the pain persists or worsens,then other causes of hip and leg pain like arthritis(osteoarthritis or rheumatoid arthritis), bursitis (Inflammation of the sacs or space around the joint), tendinitis from repetitive or strenuous activity or infection of the joint leading to necrosis have to be probed after consulting an orthopedician.Do you recall any injuries that you might have had in this area? Have you had similar pain in the past?You may try using pain killer and local applications for some time. Remember to take an antireflux medications with the pain relief medications to avoid symptoms of acid reflux.Also avoid exercises and moving the legs to the extreme positions. Keep the legs stable and use low heels, and comfortable footwear for a week. If these and hot fomentation do not help you, you may need to get this examined and tested by a doctor.Let me know if you may have any more queries.Regards.