I don't get it... so many articles explaining how to do something so simple - so long as you're not doing something you absolutely despise or is terribly boring, it's just a matter of making a conscious decision to remain awake despite the time....
Many times I find my alarm clock ringing its wake-up call while I'm still hunched over my PC churning out the code, because I'm in love with what I'm doing and couldn't let it go just so I can sleep.