A sudden, sharp pain in the foot is the hallmark of a muscle spasm or cramp, which can last many minutes. Overwork and muscle fatigue are common causes. Other causes include poor circulation, dehydration, or imbalances in potassium, magnesium, calcium, or vitamin D levels in the body. The changing hormone levels of pregnancy or thyroid disorders may play a role. If spasms are frequent or severe, see a doctor. Strengthening exercises can help with muscle fatigue.