If it's in the muscle, and it's a charlie horse type cramping, have your blood drawn and have a full 'scan' done on them.
The first time this happened my doctor looked at my blood results (which I had just had done that day) and said 'your magnesium is very low' since then every time it's been the same thing.
Also I've had joint problems in my knees, finally it became so bad I actually went to a specific doctor for this.
He told me the shoes that I was wearing sucked. (flat soled shoes = bad for the knees)
Have to have something with arch support, even now adays if I go too long wearing flip flops or shoes with no arch (or very little arch) my knees will start hurting.
And finally, prednisone.
I noticed that when I was on a higher dose of this my muscles weren't as 'solid' (I had a lot of muscle weakness which is a side effect), also I had knee pain/cramps.