A couple of Gloster Javelins found the answer years ago: it's all written up in an ancient copy of Air Clues.
Two aircraft were cruising side by side. Pilots bored. One went into a very shallow descent which caused him to gain speed and pull ahead. He then went into a very shallow climb. He repeated this a few times and then levelled off with his mate - but he was a good mile ahead. Never explained, but if you programmed Long Haul auto-pilots to do the same - big $$$$ saved. No?