Calf cramps can be caused by a variety of factors. Calf cramps during sleep can be related to excessive exercise during the day, where the calf muscles spasm involuntarily at rest and the calf cramps appear, usually relieved by stretching the local muscles.
In addition, it may also be related to poor blood circulation due to local cold in the calf as a result of inattention to warmth during sleep, which can usually be significantly relieved after massage and warming of the area.