It is a well known fact that some musicians of the past took their inspiration from dreams. None more so than that guy who wrote the Devil's sonata. In his dream, the devil sat on the end of his bed and played the flute. The guy, only after remembering the last trill, could complete his score. For me last night, I had a dream about me playing the piano. I was playing C, then Dsharp C sharp and B flat a flat g a. Then it kind of repeated. Perhaps it is a lot of rubbish, or maybe I could take some inspiration.
As you wake up listen for not normal sounds. You may find that the birds singing outside your window, the crickets chirping outside your house, thr truck with his muffler gate flapping outside your room, someone playing music in the house, even a sewing or washing machine going inside the house will set up a cadence which the sleeping mind will turn into musical inspiration. I once dremdt the most beautiful rap song ever. It was caused by two crickets singing outside my window. I also lived in an apartment which had a tree right next to my window which caused me to have music dreams every single morning due to the birds chirping outside.