Every time of the day, it's like asking at what time does a musician compose, or an artist paint or a author write. Surely, we can consider the physical activity work, but the mental activity is also work and precedes the physical. The brain churns on the problem at hand most of the time even when we are away from the computer. I would even be bold to say, more so when we are away from the computer and not distracted…
That's a pretty useless way of seeing things. You might as well define eating or going on the toilet as 'writing' since hey, they might be thinking about it while they're doing it. If you look at actual writers talking about when they write (https://www.gwern.net/Morning-writing) many of them are quite explicit about taking breaks to do other work like correspondence or family/friends in order to not think about writing.