Former con artist Frank Abagnale obtained free air travel by posing as a pilot and deadheading during his crime spree. This was shown in the movie Catch Me if You Can and described in his book of the same title.
The actual term is an old theater term. Once the show/play started the ushers would count the empty seats then allow non paying people to fill the seats. A full theater for a performance was desired, for the actors and the overall reaction to the show. The people that were let in were called "deadheads" because they did not buy tickets, just like the crew in an aircraft that is being repositioned for their work duties.
The term is used similarly in the US commercial trucking industry to describe the repositioning of a trailer empty of revenue load; a related term is bobtail which refers to a tractor not pulling a trailer at all.