Actually, coffee may be part of that.
Turns out that coffee delays the build up of some chemical that makes you tired... i.e. it makes your body clock run slow, when taken in the morning.
However, if you take it late at night, before you go to bed, then the level of that chemical goes down more quickly and you'll wake up earlier the next day. Surprisingly it doesn't make it that much harder to go to sleep either, although if you're not already tolerant to coffee, all bets are off on falling asleep promptly.
Other things that affect the body clock are light, and food (big breakfasts are good for waking up early the next day, skipping breakfast = super bad).