Every night I wake up with bad leg cramps. What shouldi do?

Common. Leg cramps are a common problem. The cause is unknown, though. Try magnesium supplement, tonic water with quinine, potassium supplements may help. Local heat or topical rub such as bengay/icyhot or voltaren (diclofenac) gel may be of some relief. Avoid exercise before bedtime.
Seek cause. Tired, irritated muscles due to a number of causes result in cramping. Venous incompetence results in leg swelling; prolonged working, standing, dehydration, heavy exercise are other causes. Low levels of potassium, calcium, magnesium from diuretic use can cause cramping. Try stretching exercises, ice massages, see a venous specialist (phlebologist) for help.
Many causes. One of the most common symptoms of varicose veins and venous incompetence is leg cramps. As much as 70% of the time, people with varicose veins will have leg cramps. Although there are many other possible causes, as others have said, if you have any visible veins in your legs, you should see a venous specialist (phlebologist) for help.
Could also be low Fe. Agree with other answers. Sometimes nighttime leg cramps are associated with iron deficiency (with or without anemia). Get it checked (blood test for iron-fe, iron binding capacity, and ferritin-iron storage protein).