As hangover means something remaining or leftover, I presume it refers to what have you have left from the night before.
The French are much descriptive: they say a mouth of wood - which is a pretty accurate description. The Germans say a tomcat - where does *that* come from?
maxi is right: it was first recorded in 1904 to mean the after-effects of drinking, but previously meant something more generally left over - 'He's a hangover from the 1980s'. The description ' hung over' came from this, rather jokily - it doesn't mean you're actually hung over anything.