Most programmers have experienced being so immersed in code that we don't notice time is passing, forgetting to eat or sleep.
It's similar with immersion in social media / food / whatever. We become lost in the activity and lose our sense of self.
I've recently heard of the concept of conscientiousness as a personality trait. People with low conscientiousness tend to procrastinate more, and it's tied to ADHD. Apparently it can be trained. I'm trying (though not really succeeding) to make pauses, take a deep breath and think about "what am I doing right now? What should I be doing instead?". Seems so basic, like I've regressed to being a child who has no self control...