There is no single best vitamin for treating foot spasms although supplementation with the mineral magnesium, while not well supported through research, may be helpful to reduce symptoms. Always check with your healthcare provider before taking or increasing your dose of supplements.