Hi Lewis - It's due to your joints being created too straight (Hip / Knee / Ankle). When you make those joints you should always create a bend (however slight) so Maya knows which way you want the IK to work. For example, creating the hip, knee, ankle joints so they look like they are slightly bent as a human knee would bend their leg. I do mention that being important in both the year 1 and 2 rigging videos because in some cases a minor mistake like that can be very destructive and mean starting over (redoing skinning etc too). In this case unfortunately you will need either need to recreate the legs again or (if you're lucky) be able to enter a very small value (starting at 0.02) for example into the correct 'joint orient' channel in the Attribute Editor (after selecting the knee joint). The correct joint orient channel will be the one which rotates the knee joint in the correct direction - Probably Y / the middle channel.
Note: If that doesn't work it you may be that you have values on the joints (check the channel box rotations / they should be 0) and the Joint Orient's in the Attribute Editor. In you can;t figure it out send me the file.
Thank you Alan, luckily I managed to fix it :)