The Beatles’ classic ballad “Yesterday” has a dreamy and gentle melody, with lyrics that feel plucked out of a man’s deepest subconscious. So it’s only fitting that rock legend Paul McCartney came up with the earliest stages of the song in his sleep, then let them pour out of his soul on the piano next to his bed. Even better, that initial inspiration happened in the attic of the apartment where he lived with his then-girlfriend, who shaped so much of his music throughout the Beatles years.
“I woke up with a lovely tune in my head,” he told author Barry Miles for the biography Many Years From Now, which was published in 1998. “I thought, ‘That’s great, I wonder what that is?’ There was an upright piano next to me, to the right of the bed by the window. I got out of bed, sat at the piano, found G, found F sharp minor 7th – and that leads you through then to B to E minor, and finally back to E. It all leads forward logically. I liked the melody a lot but because I’d dreamed it I couldn’t believe I’d written it.”
Source: biography.com