Monolith is right , leg cramps can be caused by water over intoxication. With that said, we really don't know what causes most nocturnal leg cramps.
In women, the most common cause is anemia! Other medical conditions include low thyroid.
In both male and female athletes, nocturnal leg cramps many times respond to calcium supplementation and magnesium supplementation.
The RDA for magnesium is 350 mg/day. Average intake in the USA is between 143 and 266 mg/day. 500-1000 mg/day would be good for most bodybuilders as they have an increased need for this mineral. Hard training seems to deplete the body of this mineral as well as other minerals. Calcium supplementation of up to 1500mg a day is recommended for my athletes.
Pyridoxine, vitamin B6, is also supposed to reduce leg cramps. This is alos beneficial if you have migraines.
Vitamin E (tocopherol) has a weak action and has to be taken in doses of 400 iu a day.
Peppermint has a weak action but can lessen cramps, but this can make reflux worse (especially in BBs since most have hiatal hernias to some degree anyway.)
Doctors often prescribe quinine. Quinine raises the treshold for acetylcholine at the motor end plate. However, you can get some quinine through tonic water.