Is there any relationship between leg cramps and high blood sugar levels?

Electrolyte imbalanc. If you have chronic, poor control, you can lose potassium and other minerals in your urine making it more likely to develop leg cramps. Additionally, urinating frequently from high blood sugar also makes one more likely to become dehydrated which also increases risk for leg cramping. With diabetes-related kidney disease, calcium can also be low causing muscle cramping.
Leg cramps & sugar. There could be a connection, but it is not direct or obvious. Sugar by itself does not cause leg cramps. Chronically high sugar, of course, is diabetes, and diabetes decreases circulation in the legs, and that could cause cramps. But this doesn't usually start until you have had diabetes for many years. If you are taking a statin medication for cholesterol, this could also be a cause.