From Far Out Magazine:

Paul McCartney: “I was living in a little flat at the top of a house and I had a piano by my bed. I woke up one morning with a tune in my head and I thought, ‘Hey, I don’t know this tune – or do I?’ It was like a jazz melody,” recalled McCartney of the song’s composition. Speaking as part of The Beatles Anthology he continued: “My dad used to know a lot of old jazz tunes; I thought maybe I’d just remembered it from the past. I went to the piano and found the chords to it, made sure I remembered it and then hawked it round to all my friends, asking what it was: ‘Do you know this? It’s a good little tune, but I couldn’t have written it because I dreamt it.’”

McCartney was determined to make sure the tune became a song. As such, the singer used any lyrics he could think of so that he could compose the melody of the track. The original title for the song, therefore, was actually ‘Scrambled Eggs.’ McCartney’s original lyrics were, “Scrambled eggs, Oh you’ve got such lovely legs, Scrambled eggs. Oh, my baby, how I love your legs.”