This is because alcohol is an anesthetic. And the human body will tend to wake up after an anesthetic wears off. I believe the anesthetic properties of alcohol lasts roughly 4 hours, so if you sleep you'll probably begin to stir and wake up 4 hours after your last drink. Very similar to surgery patients who naturally wake up after the anesthetic used for surgery wears off.