Clegg, like everyone else has stated, it is truly possible to compose music in your dreams. I've never actually created music while lucid. During normal dreams, however; I heard magnificent music that I've never heard before, and awakened with the tunes stuck in my head on several occasions.

I'll admit that I'm not very musically inclined, and I've never taken the initiative to capitalize on any of these occurances. I'm sure someone like yourself would have no problem accomplishing the feat though. Good luck.