I have bought a power outlet timer that I use to turn off my internet at around 23h.
Of course I could turn it back on, but I've tried to make that a hassle, so usually it's enough to convince me to go to bed.
Otherwise I'll stay awake for coding too. I doubt that's common in general, but this is a programming community so you'll probably find some like-minded people.