The F/A-18 Hornet and MiG-29 ailerons from the external parts of the wings go up some degrees in flight. Why?
The pictures in the question show the normal position of the MiG-29 ailerons. That's how they are unless a roll is commanded.

According to Mikoyan Mig-29 Fulcrum Pilot's Flight Operating Manual (google books) the slight upward position is set to improve yaw stability during roll meneuvers:



As for whether this angle (neutral position of ailerons) changes in accordance with flight envelope: it does not. Check out this and this Youtube video for an example. Climb, dive, straight and level, no change. The position of the ailerons is not affected by load factor either, as you can see below, 1g (straight &amp; level flight):



... and a pull of 3g's:



(Source: the second Youtube video posted above)

Whenever you see the ailerons move, it is always accompanied by roll.

As for the F-18, I'll investigate and be back later.
(edit: as a preliminary claim I'd say the F-18 drops flaps a few degrees on high g maneuvers to increase camber, but the flaperons only move when roll is comanded or flaps are lowered. So no flaperon up with high g)