I don't often remember my dreams and if I do it's only briefly when I wake up. I have heard several really killer songs in my dreams but forget them by the morning.
When you wake up with an idea in your head from a dream
Get up and capture it even if in its simplest form.
More detail is better, but that at least prevents you from forgetting it by mid-morning ... simplest solution is best for me.
I've done the same thing, wake up bopping a tune in my head and two distractions later I lost it. <shrug>