Horrible leg crap at night

Su

Last night I had the worst calf cramp of my life! It still hurts this mornings when I stretch it out. Anyone know of good ways to prevent this from happening? I drink a ton of water so I know that’s not it and I’ve not had any issues till now. I’m not on my feet a lot, but am wonder if being in the car alit this past weekend may have caused it?