For me, I find my sleep suffers because of what some describe as "revenge bedtime procrastination". When my job is shit (i.e. now), I'm more inclined to stay on the PC later doing things that bring me some level of joy, or play games to escape the mind spinning its wheels. I seem to more easily recognise that my job is unfulfilling because I'm staying up later or I'm dreading going to bed. Going to bed early for a go…
To be perfectly honest, usually I'm staying up because of "the hormny" or because I've found something technical/geeky to immerse myself in. But I think the core thing is not "losing track" of time, but for some reason I see the time and just feel apathy like, it doesn't matter that it's 2,3 am or whatever.