My problem too. I actually can't fall asleep because my brain keeps throwing out random ideas at me, like a toddler tugging at my sleeve: "is this solution good enough? no? How about this? No? What about this? No? This?" and so on and so on throughout the night.