Many activities and situations can cause muscle cramps at night, according to Delaware Integrative Healthcare. Your muscles can spasm if you work out or stretch too hard one day. Muscle cramps might also signal a misalignment of your body, so certain muscles might work harder while others become shortened over time. A vitamin B12 or other deficiency might also cause muscle spasms or cramping. A herniated disc could also put excessive strain on your surrounding muscles.
According to the Medical University of South Carolina, athletes of all levels and ages can experience cramping due to a loss of electrolytes through heavy sweating. Dehydration overall can cause muscle cramps even in non-athletes, and this is more likely if you consume a lot of caffeine. Alcohol use disorder, renal disease, and hypothyroidism are also conditions linked to muscle cramps.
Muscle cramps can become more common as you get older. According to the University of Utah Health, one-third of people over 60 have had muscle cramps at night within the last two months. Medications for high blood pressure, heart disease, and cholesterol also increase your risk of experiencing cramps.