I'm not saying that this will solve your problem but you should look at introducing yourself to the joint editor (Window/Joint Editor). With the leg bent move the handles I've shown (adjust) and that will affect that deformation. Make sure you have Bend selected in the Joint Editor. The Bulge Settings are another tool that can be used also.
Will this fix your problem? Not all of it but you can make a difference with some of what you're seeing.
Comitted to excellence through art.