The lightbulb turns on when you get an idea (think of the comic strip image of the lightbulb in a bubble over the character's head.). For me, this happens maybe 10 or 15 times during two and a half hours of writing. Sometimes, the flashes are banal: "move this paragraph from here to there." Sometimes they are slightly more interesting, and sometimes they are really wonderful ideas (in my humble opinion). So it is the act of writing is what makes the flashes possible. I might occasionally get an idea later in the day, when I am not writing, but most of the inspiration comes during the process itself.
So by not writing, you are also not doing as much thinking.
Gerald Early points out that "critical thinking" is a redundancy. If it is not critical, it should not be called thinking.