Also remember that airplanes are balanced with respect to the direction gravity is going at any given time. As the plane goes over the curvature of the earth, the gravitational pull should also change the angle at which the plane needs to be to stay balanced. In the case of planes which are naturally stable, like a Cessna 172, this could be considered a sort of pendulum effect, whereby the bulk of the plane's weight hangs below the wings which generate lift. As gravity changes going over the curvature of earth, the differing direction of gravity readjusts how this pendulum wants to hang. This, in turn, orients the plane automatically.
You could also say it's a pressure thing, whereby the minute pressure differences at x+1 feet vs x feet cause the plane to generate less lift, causing it to fall back to x feet.