I don't want to get off on a personal theory here, 'cause I'm no expert and it's against site policy.
But i will share my experience.
1. For me, sleep before midnight does a lot more good than sleep after midnight. Late nights make me feel hyperactive, thinking impaired(loggy) and anxious. Don't know why, probably some biological rhythm of my own. But it can become a habit to stay up too late.
2. Our brain is divided into sections, simply put "old" and "new".
They interact not like one would think. And a lot during sleep.
Here's an article so you won't think I'm nuts:
http://newsroom.ucla.edu/portal/ucla/ucla-scientists-discover-that-239347.aspx
My sister , who has psychological training, taught me to pay attention to my dreams.
That famous shrink Carl Jung believed it is through dreams that the "old" and "new" brains communicate, as my sister says " working out their differences at night."
From what you describe, you have a lot of mental activity just before retiring for sleep.
My advice would be:
1. Try earlier nights, get up at 4 or 5 am. Make that your high activity period.
If your biorythms are like mine you'll feel better soon. And the quality of your work will go up.
2. Get yourself a copy of "Man and his Symbols" by Carl Jung and pay attention to his observations on patients who discuss their dreams. See if your personality includes any of his "Archetypes" just for curiosity's sake... .
Then start yourself a dream log, a little notebook aside your alarm clock, where you jot down what was in your mind the instant you awake as well as any dreams you remember. Most dreams slip away after only a couple minutes so it's important to capture them immediately on waking.
As my sister says - "Every dream is a telegram from your subconcious." She taught me to open them.
mentors - if this post is inapprppriate, just delete .