I've been cycling two years now and have only just noticed mainly from using my new turbo trainer that when I'm pedalling my left leg is about 1" or so from the top tube whilst pedalling but my right leg is 4-6" away from top tube. Ordinarily this wouldn't concern me but recently I've been getting a lot of pain in my right leg from my hip downwards. Could this be my problem and does anyone have any thoughts on what to do, get bike fit?
Before you start looking at bike setup/fit and/or different bike parts I would get your flexibility assessed. With one knee deflecting nearly a 1/2 foot more than the other, this suggests either underlying flexibility issues or functional issues. A bike fit can help to some degree to mitigate the issue, but a good fitter will also tell you that modifying bike fit is no substitute for fixing any underlying flexibility/functional issues.
Knees do not take kindly to off angle loads, in fact neither do most the joints in our legs and hips. Often flexibility issues can cause us to modify our pedal stroke to compensate, including knee deflection, which can lead to repetitive stress injuries.
Do you sit down a lot for work? This combined with cycling can really do a number of hip joint flexibility, which can have far reaching functional ramifications outside of just cycling depending on how your body compensates for any lack of flexibility.
Do you have a regular stretching routine? If so, good. If not you might need to consider this (especially hip and hamstring flexibility) as part of your regular routine.
Do you release muscle adhesion (and potentially muscle shortening) in your legs? - Sometimes referred to as muscle knots, these can also affect range of motion and therefore realized flexibility. Self-message (e.g., leg rollers) can be used to release these. IMS treatment also works well.
Anecdote: Muscle adhesion and shortening in my upper quad were affecting my range of motion through the upper portion of the pedal stroke causing knee defections inwards (my compensation behaviour) which resulted in IT band issues (outer knee and outer hip discomfort).
Above all I would consider getting an assessment from a physiotherapist who can identify functional mobility issues. This is the best place to start, especially considering one knee is deflecting out nearly 1/2 foot more than your other. When one knee tracking is this far off, it is only a matter of time before repetitive stress injuries arise. Bike fit changes can compensate, but the issue will likely re-emerge especially if there are further change to flexibility and functioning. Once issues are identified, you will likely be given strengthening and stretching routines to help address the issue. It is worth sticking to them for long term health.
Doing a bike fit would be a logical and quite expensive answer.. But in all cases it most of the time resolves the problem.
If you want a cheaper way to do it, probably check your cleat position if you are running on any. And slightly adjust your cleat to the outermost part of your right shoe. If this still does not resolve the way you pedal it must be from a physiological state of your body in which your right side is a bit longer than your left. If that is the case you have to do stretches to enable you to be able to ride your bike a bit higher to pull your leg a bit closer to the TT. And possibly also check you seatback on the your saddle, maybe it is a bit too close to the handlebars, which causes your knees to flex and bend in an abnormal manner.
As I said earlier a bikefit by a proper pro is most recommended. But it is of course up to you.
You need to first give yourself a rest from the bike, do some other exercises instead - non impact -like walking / swimming.
Everyone is different. One of my legs is slightly longer than the other / or I pedal in an unbalanced way so your set up might require some personal customisation.
Have a think about your set up - seat height, position of cleats.
If you do use cleats, consider switching to flats for a bit or trying out a pedal with more float. Check your fore-aft position of the saddle, that will affect pressure on your knees too.
Consider paying more attention to your gait and rhythm when you pedal.
You mention that this occurs on a "new turbo trainer." Are you sore after a road ride? Also, when you use the trainer does it replace some of your miles or do you just add them to your usual routine. Being new, I wonder if you are riding the trainer and also riding your usual road miles.
My guess is that it's not bike fit (but it is a good one) but rather a case of over training. Take some time off the turbo trainer, dial your road miles bike to 50% of normal and treat every ride like a recovery ride for 1-2 weeks. This is my own personal experience. Your mileage may vary :)