Leg cramps have many causes, but the main point is that they are uncomfortable and annoying. The root of the problem most likely lies in some sort of deficiency. While these diet issues are being corrected, there are some things you can do for immediate and long term relief.
Take 400 IU of Vitamin E before bed. The Vitamin Book: the Complete Guide to Vitamins, Minerals, and the Most Effective Herbal Remedies and Dietary Supplements, suggests that research is limited, but Vitamin E decreases the frequency and severity of leg cramps.
Massage aloe vera gel on legs. The cooling sensation eases the cramps.
Stretch if you can. Gentle stretching can work out the cramps and keep them from coming back.
Use a heating pad. This relaxes the muscles and keeps them from constricting.
Take a warm bath with Epsom salt. This soothes cramped muscles in the legs and melts away pain.
Increase calcium intake. Earl Mindell, author of the Vitamin Bible for the 21st Century, suggests that calcium deficiency is related to leg cramps.
Try a ginkgo biloba supplement. This herb improves circulation to the legs.