I had some muscular soreness in my thigh/bum when I first got serious about cycling. I had someone assess my cycling action and it was noticed that I had one leg that internally rotated through the pedalling motion. My cleat angle was then adjusted slightly outwards on this leg which allowed me to pedal without internally rotating so much. It did take me a little while to adjust to this new position but it did eliminate the muscle problems I was experiencing in my upper leg.

I would get someone to ride behind you and take a good look at what your hips, knees and ankles are doing when you pedal.