Your foot could be cramping for several reasons. Without an examination, I can not tell for sure. You could have a neuroma, a stress fracture, or plantar fasciitis, for example.
You should see a podiatrist for further evaluation and recommendations. I'm sorry I can't tell you more.
Vivian Abrams DPM