Has anybody ever told you you should lean forward when a horse goes uphill and lean backward when a horse goes downhill? Well they are wrong, never lean!
You always want to be balanced in the saddle. In this case 'balance' means you want to stay in a 90 degree angle with the earth. So although it might look as if you are leaning back compared to the horse, in actual fact you stay upright. Same goes for when you are going uphill.
Also when you are riding on a level surface you want to sit upright. You basically sit in the saddle as if you where standing up. This way your pelvis is upright and able to follow and direct the movement of the horse.
How do you know if you are balanced?
Easy, just imagine somebody would take the horse out from under you. Would you land on your feet? If the answer is yes, then you are balanced.