For me, there are a couple main reasons for my calf/foot cramps. First is vitamin/mineral imbalance. Imbalances tend to trigger the "charliehorse" type cramping. The trick here it to determine what you are deficient in and adjust your diet to add a little bit more. Most common deficiencies causing cramping are lack of potassium, magnesium and calcium. Sometimes dehydration is a factor. So if you think this is the issue, be sure to drink a little extra water, and include foods or supplements that increase your potassium, magnesium and calcium intake (spinach, broccoli, almonds, raisins, banans, etc).
The other main cause for me, as I'm very athletic, is plain overused/tight muscles that need extra massaging to loosen up. If you think this is part of the cause, to loosen your foot muscles, I suggest taking either a racketball (if you have one) or a tennis ball (better for first time massaging) - place the ball on the floor and your foot on top. Then roll your foot on the ball finding the tight/knotted areas, and spend a little time rolling over those spots. Do this for a few minutes each foot every day or every other day. Second, you can use the same ball or get yourself a foam roller, and use that to roll out your calf muscles. Sit on the floor with your leg on the ball/roller and roll up and down your calf finding the tight/knotted muscles and spend 30-60 seconds rolling out each tight area. Be sure to roll on the outside, center and inside of your calf. If you have tight calf muscles, that often puts strain on your foot muscles.
Lastly, once you work out the tight/knotted muscles, it would be a good idea to do some calf raises and basic calf stretching a couple times a week - this will help strengthen your calf and foot muscles and keep them loose, and less prone to cramping.