If you're anything like me, sometimes your brain won't turn off.
Some writers like this, and I freely admit that a 2AM brainstorm can be productive as hell. I'll take inspiration where I can find it, thanks. But there are those long nights when you have to hit the 40/wk bright and early and good old brain is like, "Check me out! Look at all the things I can do!" and it won't stop.
I've got a little soothing trick for what I call Imsomniac's Imagination. I write with other people's characters. I let that talkative brain chomp down on a character that's grabbed me from whatever I'm reading, or a favorite from a television series. It's great because the brain can run with it and I don't have to feel like I need to be responsible and jot something down before I forget it.
I'm not producing anything I can use as a writer, but I'm exercising my brain and giving it the freedom it wants in the dark hours. So try it next time you keep glancing at the clock and reminding yourself to go to sleep already.