Sleep related leg cramps are sudden and intense feelings of pain in the leg or foot. The pain is caused when a muscle contracts and tightens. The cramps occur without you being able to control them. They may happen while you are still awake or after you are asleep. They normally begin very suddenly.