It's insane, but it happens to me also. Just when you think you're so tired that you can sleep, your mind goes in overdrive and the most crazy ideas are spinning round and round. Unfortunately, I forget most of them. But yeah, I can very much relate to this.
Kind of makes you wonder what kind of world changing ideas are lost forever!
I´m sure they would be life-changing ... if I could only remember them