Songs. Stories. Paintings. Things come just before sleep and while dreaming. It is my regular to habit upon waking to think about and focus on what I was just dreaming and remember as much as I can before allowing my mind to turn to the waking world. More often it's personal insights about life but sometimes good ideas come this way.
I used a recorder in the past but found it tedious to listen to the recordings. I prefer the notepad, and if the idea is complicated, I will grab the laptop or go to my desk.