John Lennon told the group's biographer Hunter Davies that he got the idea for the song from having the television on one day and hearing a Kellogg's Corn Flakes commercial. It gave him only a title, however - the lyrics he subsequently came up with have nothing to do with the advertisement. This reflection on everyday boredom is placed near the end of the album Sgt. Pepper, perfectly setting up the final track A Day in the Life.
On February 16th, Paul added a bass line and John overdubbed a lead vocal. Both Anthology 2 and the 50th Anniversary Edition feature the track at this stage of its development. The song was then set aside for weeks while John pondered over what to add to it. He eventually decided that a brass section was what was needed, and he knew exactly who he wanted to play it. The Beatles had worked with a group called Sounds Incorporated both in Hamburg and on their 1965 North American tour. Only two members remained from the earlier lineup, but six current members of Sounds Inc. arrived at Abbey Road Studios on March 13th to record with the world's most famous band. After drinking tea and being among the first to listen to some of the finished Pepper tracks, they were put through their paces by John for roughly three hours until he got the sound he wanted.
The track then sat dormant again until March 28th when a stinging electric guitar solo was added by Paul. John then double-tracked his lead vocal in places, and he and Paul overdubbed the "good morning, good morning" backing vocals. Afterwards, John and engineer Geoff Emerick spent hours discussing the sequence of animal sound effects that Lennon had chosen to use during the song's fadeout. Most of those effects were compiled from the EMI vaults in the pre-dawn hours before they went home.
Those effects were overdubbed the following evening, March 29th. One effect was placed just before the music begins - the crowing rooster, thus tying the song in with the Kellogg's Corn Flakes ad which had inspired it. Days later, as the album was being sequenced at the mixing stage, the clucking hen at the end of the effects syncing up with the sound of an electric guitar at the start of the Sgt. Pepper reprise was discovered by Emerick and producer George Martin. This proved to be a brilliant final touch, though the edit on the mono mix, usually the superior version, is not nearly as good as that on the stereo mix.