In my experience legs cramps is often not enough hydration. I did a hike up a mntn came back. Ate & sat by the fire till I crawled in hammock a few hrs later both legs got cramps. A buddy who was with me handed me 3 16oz bottles of water. By the time I sipped thru 1.5 bottles cramps eased up. When my soldiers are standing all day & complain about legs cramps 9 out of 10 times they have not hydrated
Funny someone said cold packs help. When at home if I wake up with leg or foot cramps I run hot water in tub and stick my leg in there. :-)