Exercise your toes and calves regularly. Any time you get the chance, stand up straight and go up on your tiptoes, with your weight on the balls of your food. If you're concerned about your balance, stand behind an upright chair, holding the top back of the chair with your fingertips. Raise your heels so that you are standing on your tiptoes, with most of your weight on the balls of your foot. Hold this for five seconds, then let your heels go back to the floor, so that your weight is on your entire foot. Repeat this for a total of 10 times. Even done just once a day, this will strength your calf and foot muscles.
Eat foods that are rich in magnesium, calcium and potassium.
A tennis ball is an excellent self-massage tool for exercising the soles of your feet. Sit in a chair and place the ball under one foot. No shoes, of course, and while you can wear socks if you wish, you'll probably enjoy it more barefooted. Press down with your foot and gently roll the ball up and down, back and forth, and around. Do this however and wherever you feel that your foot needs it. You'll find spots on your foot that are very sensitive, and others that are not at all. For best results, press down on the ball with your foot as firmly as you can, but not to the point where it hurts. Or better, not to the point where it hurts too much. Just at the borderline. The experience should be enjoyable, but effective. When you feel you've done enough with that foot, do the same thing with your other foot. And remember. Only enough pressure to feel good
Make sure your diet inclues these foods which are rich in vitamins. Their deficiency may contribute to leg cramps.