I set up my own checkpoints on any game I play... "Play X game for Y amount of hours and stop, with or without saving..."
Also, if I can't sleep, I would always turn on my PS3 and immediately play a game like SkullGirls until I lose a match against the COM once...
Other than that, I will always loose track of time if I end up playing any video game after 6PM...