At what point during a long flight do commercial airliners have the best gas mileage?
There are a lot of things that go into determining the most efficient way to operate a jet, and minimizing fuel does not always make it cheaper to operate.  Some general "rules" that are used are:


There is an optimum speed to fly the airplane, which depends on several factors:

Altitude
Fuel savings by flying slower -vs- increased maintenance costs because you are taking longer to get there (and putting more time on the airframe/engines).
Temperature at cruising altitude
Winds at cruising altitude

There is also an optimum altitude to fly the airplane:

Aircraft weight
The higher that you can fly, the better - until you don't have enough power to maintain your optimum speed at the optimum power setting for the engines.
Temperature at cruising altitude
Winds at cruising altitude
Altitudes that are available from ATC
The amount of fuel and time that it takes to climb -vs- the amount of time that you will have at the high speed cruise



Anything that makes the airplane heavier makes it unable to climb as high (and lowers the optimum altitude for the current conditions), and makes it burn more fuel.  This includes the fuel itself.  Assuming a constant speed and constant weather conditions, you will always be more fuel efficient later in the flight.

As fuel gets burned off, the amount of thrust required to maintain the optimum speed goes down and the optimum altitude goes up.  Basically, we keep reducing the power to maintain speed until the optimum altitude increases to an altitude that ATC can let us climb to.  This is known as a step climb.  The speed will be controlled manually by the pilot, or can be controlled automatically by auto throttles.

Today's sophisticated flight planning software takes all of this into account and gives the pilot a very good plan on how to operate the airplane to be the most efficient!