The idea for the song came about when Starr was on a boating trip with his family in Sardinia in 1968. He ordered Fish and Chips for lunch, but instead of fish he got squid (it was the first time he'd eaten squid, and said "It was OK. A bit rubbery. Tasted like chicken.") Then the boat's captain told Starr about how octopuses travel along the sea bed picking up stones and shiny objects with which to build gardens. Starr said that hearing about octopuses spending their days collecting shiny objects at the bottom of the sea was one of the happiest things he had ever heard, inspiring him to write this song.