Tim Bowen sheds some light on the origins and definition of the phrase the graveyard shift.
Speakers at conferences and teachers are often heard to describe the afternoon session immediately after lunch as the graveyard shift, meaning the most difficult session of the day (in this case because the members of the audience or class have just had lunch and are feeling increasingly tired as the blood rushes from their heads to their stomachs to digest the food). The expression exists in industry too and is normally taken to mean the least popular shift of the day, normally the one that involves working through the night or at other antisocial hours.
The origin of the expression appears to have nothing to do with graveyards, however. At one time, the word gravy may have applied to any thick liquid. The 1811 Grose dictionary has the following definition for gravy-eyed: “bleary-eyed, one whose eyes have a running humour”. People whose eyes were sore or runny through illness or lack of sleep were described as gravy-eyed, especially those working at sea. The most unpopular watch at sea (at night) became known as the gravy-eyed shift. The story goes that this was misheard by those unfamiliar with the language of the sea and passed into everyday use as graveyard shift.