Part of it is the reason a hair of the dog slows a hangover down.
You body will process ethyl alcohol first, before it process all the other alcohols (methyl etc) which produce much worse breakdown products and really make the hangover get worse.
When you wake up you may still be metabolising ethyl alcohol, then when your hangover really kicks in, it is the more toxic shit being processed. A hair of the dog adds ethyl alcohol back into your system, which the body then works on.
But all it really does is delay the worst of the hangover.