There are two main types of cramps- exercise or night cramps.
Exercise cramps occur during exercise, after or the next day. This is due to lactic acid buildup and temporary reduced oxygen supply to the calf muscles, meaning the muscle is working too hard. Treatments to reduce this include calf stretches, magnesium tablets, dry needling to reduce muscle tightness and orthotic therapy to correct walking style and posture that causes the cramps.
Night cramps occur due to constant reduced circulation of blood to the feet. Common symptoms occur at night which would wake you up and having to take a walk to reduce the cramps, or walking during the day after a specific distance. The reason for these cramps to be more frequent at night than during the day is as you are lying down, gravity is not there to help the flow of blood to your feet. This is common in those with diabetes or circulation issues called peripheral vascular disease. This is a more serious cramp that needs to be discussed with your doctor, as there may be a permanent blockage in your blood vessels.