It could be a bone spur. I have serious upper thigh pain, muscle I think, doctor pretended to diagnose it and said it was because of a bone spur. Offered no solution other than to have a hip replacement. Didn't show me pictures and got upset when I asked him too many questions. I'm still trying to find out what is causing the pain.
I know that if I lay flat on my bed I don't have pain. But it can be bad when I sit on certain chairs. On the other hand, when I move the leg to get out of bed, it really hurts. It's been that way for at least 2 years. I can't say if yours is linked to diabetes. Some statins give muscle pain, I don't take any.