Try these things. Cramping in leg muscles come on with tired, irritated muscles, often after long days work on legs, heavy exercise. It can come one when potassium, calcium, magnesium abnormalities are present, common with taking of diuretics, and venous disease is also a cause. Try stretching exercises, ice massages, replenishing of minerals, and have phlebologist check out your veins.
Depends on cause. In otherwise healthy individuals, especially when associated with activity, some fluids (water, gatorade, etc) is usually sufficient. Otherwise, it could be a sign of much more serious issues such as peripheral vascular disease, restless leg syndrome, blood clots and others. If it doesn't resolve quickly with fluids go see your doctor for an evaluation and testing.