I used to sleep poorly, but I worked out it was down to me not using my brain enough. Since I started writing a lot, I have slept excellently, because I get those thoughts out, or I make my brain work. Lately, I haven't been able to write as much as I would like, and my sleep is again suffering.
I can switch my brain off, but as soon as it is on again, it knows that I didn't work hard enough.
Oh, that's interesting. At least your brain makes you write more. Mine has like a permanent writer's block. I need a lot of effort to write long posts. Comments on the other hand seem to be fair game.