I'm the same, I usually stay up late at night even when i am very sleepy. Its a bad habit of mine. Usually it happens when i am on the internet, I find it so hard to tear myself away.
I do two things to prevent it. One thing I do is set myself a time to go to bed, and stick to it. So if I want to be in bed by 11, i make sure that I am logged off by 10.30 - if I am sleepy and not online, i find it much easier to just head for bed.
The other thing i do, is to just not switch on the computer at all lol