David Cheong, a fellow software developer, has some very good tips for how to wake up early on his blog. I personally use half of them to get my self out of bed in the morning. The most important one that I use is:
I’ve found this to be the single most important element in being an early riser. Days in which I did not crystallise the reasons for getting up were more likely to result in sleep ins. Now, I make it clear the night before what it is I want to wake up early for. Initially, I found writing things down to be helpful, but this isn’t always necessary, as long as it is clear what the reasons are.
Basically you have to enjoy what you are doing in life, and once you do that it makes waking up so much easier. Even after a long night of coding where you worked on a mind-boggling problem that kept you up till 1:00 AM. It is a very good read even if you are not a software developer.