Cramping in the calves has several causes, but the true cause is not fully understood. Your history will likely give the most clues. True muscle cramps involve intense muscle contraction and the muscle needs to be lengthened to resolve the spasm. This differs a bit from calf pain from causes other than cramping that results in muscle spasm.
Exercise-related cramps are likely caused by muscle fatigue and may involve the Golgi tendon bodies, which normally fire to inhibit the muscle from contracting too hard. If the Golgi body fatigues, the nerve input to the muscle is overstimulated and the muscle cramps. This is an oversimplified explanation of a rather complex interaction proposed in the late 90s by Martin Schwellnus from South Africa. This may also be the cause of a “Charlie horse” type of cramp that strikes in the night or when sitting with the calf in a shortened position after an exercise bout. (I used to get them on the bus ride home from away track meets.)