For sites that expect to get a lot of search engine traffic, this question should be a top priority. Sites that try to get more traffic from Google than they deserve, by employing search engine optimization tactics that Google doesn't like, typically discover that such arbitrage opportunities disappear very quickly.
According to the Mayo Clinic these are some known causes of leg cramps. As you can see alcoholism and dehydration are listed. I doubt that a couple of glasses of wine will cause them, but drinking water right before going to bed may help.
Drink more water to help prevent charlie horse cramps. Dehydration has been implicated in the cause of leg and feet cramps. Most adults need at least 8 large glasses of liquid per day, usually more if you are active or live in a dry climate. This liquid should be mostly made up of water, juice or healthy sports drinks.