I'll echo the suggestion to spend maybe 15-20 minutes before bedtime with paper and pen and do a mind sweep.
But then another thing to do is keep the pen and paper close to the bed and learn to write without turning on the light. It takes a bit of practice but is perfectly doable. Also learn and use some abbreviations so that you don't have to write much to remember the item. A pad of small sheets of paper (mine right now is the back side of those one page a day tear off calendars stapled together) and several pens is a good solution. From experience a pencil is not as good. The lead tends to break when you try to write w/o light because it's harder to judge where the paper and the tendency is to press to hard. Put one note or idea per page and tear it off and leave on the nightstand. In the morning gather them all up and process them.
This also works for the wake up in the middle of the night things which is how I most often use it.
Oogie McGuire - Mac, iPhone & Omnifocus
OogieM on Twitter
Paonia, CO USA