You need to drink more water cause you could be dehydrated. You might also be low in potassium, try eating some bananas or kiwis. And athletic trainer once told me that if your legs start cramping, you might need more sodium. So salt your food just A LITTLE. And as always, before any physical activity, stretch!
You always get cramps in your legs because of poor blood circulation, low potassium levels and fluid imbalance or dehydration. To reduce the cramps, eat bananas and take plenty of water. However, consult your doctor in order to receive further treatment.
It could be a number of things. The most accurate advice/diagnoses would come from a doctor you see and who knows exactly where/when/why the cramps come. Don't rely on a bunch of random people on here lol but a good place to start trying to find out the problem for yourself is to drink more water and simply take a vitamin a day, and squeeze in a fresh fruit! They're loaded in essential vitamins and minerals that Americans lack in their diets. If none of that helps, go see a doctor because it could be something as serious as a tumor growing near the nerve cord or artery going to your legs. But don't worry...vitamins and water should do the trick ;)