Cramps are primarily caused by lack of water and sodium in the body. Hence consider increasing water intake and (slightly) salt intake to help relive them. Also, good ol' Wikipedia mentions Nocturnal Leg Cramps:
Nocturnal leg cramps are involuntary muscle contractions that occur in the calves, soles of the feet or other muscles in the body during the night or (less commonly) while resting. The duration of nocturnal leg cramps is highly variable with cramps sometimes only lasting a few seconds and other times several minutes. Soreness in the muscles may remain for some time after the cramp ends. These cramps are more common in older populations but may happen to anyone. They can happen quite frequently in teenagers, in some cases while exercising at night, these can be very painful especially if dehydrated.
The precise cause of these cramps is unclear. Potential contributing factors are believed to include low levels of certain minerals (magnesium, potassium, calcium and sodium), dehydration and prolonged sitting. Less common causes include more serious conditions or use of drugs.
Hope these ideas help, cause i know how painful it can be! Of course check it out with the doctor, but don't expect too much, as they have very little to go on, seeing as the cramps occur at night only, and hence it is hard to determine what causes them..