High blood sugar is not a direct cause of muscle pain.
The way to approach this is to consider the cause of your muscle pain, even if you have diabetes and your blood sugars are running high.
For example, if you are having muscle aches all over, you may have the flu or some other viral illness. Any infection will raise your blood sugar levels.
Today, one of the more common causes of muscle aches are the statin drugs used to lower blood cholesterol. Many people with diabetes take a statin. If you do, call your doctor’s office before you take your next dose. A simple blood test (called a CPK, for creatine phosphokinase) usually can determine if the statin is causing the muscle aches.
If your pain is limited to your hip or thigh, you could have a rare disorder called diabetic amyotrophy. The pain of this disorder is quite severe. It feels different from usual muscle pain. It has a burning, shooting sensation.
Also, it is just as likely that your muscle pains are unrelated to your diabetes.