Intake of less amount of calcium can lead to the problem of cramps inside the body. Leg cramps occur specially at night when the body posture is not in a proper condition. To reduce this problem one of the most common treatment is to drink milk before going to sleep. It would be better if you could eat Tums along with it. They are really helpful in treating digestion problems as well.
Our muscles require nutrients especially magnesium and calcium. It can be corrected by eating diet rich in both of them. Magnesium would really help in providing smoothness to the nerves and muscles of the body.
A very famous home remedy is the intake of chamomile tea for around twice or thrice a day. It helps in relaxation of the muscles and provides amino acid which is a requirement of our body to remain free of cramps etc.
Give a hot water massage to the legs during night. You can even take a shower which is found to a good cure for leg cramps.
You can follow one exercise for treating this problem. Try and stretch your legs while sitting over the bed and continue to stay in this position for some time. This process can be repeated while standing also.