When you hit the rear (or front) brake in the air, it stops that wheel. All of the angular (rotational) momentum gets transferred to the rest of the bike and causes the whole bike to rotate forward (front down/rear up). When you rev the engine / speed up the rear tire in the air, the opposite happens, it rotates the bike rearward (front up/back down). Before you hit the rear brake in the air, you need to make sure you have pulled the clutch in so that you won't kill the motor.
Leaning (pulling the front of the bike up or down in the air) will help a little, but when you pull the front up, it also results in your body being pulled down.
The real answer is that it is best to learn how to launch the bike into the air properly so that you don't need to make in-air corrections. In general, if you are consistently front-high on a jump, you probably need to get your weight farther forward for takeoff. If a jump is consistently kicking you with the front too low, you probably need to be harder on the gas. Notice that I didn't say you probably needed to be farther back on the bike. It is rare that beginning riders are ever too far forward. Hitting the brake in the air is something that really makes more of a difference on longer, higher speed jumps. I would worry more about body position and less about hitting the brake in the air for now.