Apparently, he had said to his friends, 'Drink to me, drink to my health, you know I can't drink anymore,' and then gone to bed and died in his sleep. So I picked up a guitar, started to strum and sing 'Drink to me, drink to my health...', and Dustin was shouting to his wife, 'He's doing it! He's doing it! Come and listen!' It's something that comes naturally to me but he was blown away by it. And that song became Picasso’s Last Words.
The issue of Time magazine was dated 23 April 1973, and the article in question was titled 'Pablo Picasso's Last Days and Final Journey'. Hoffman later described watching McCartney compose the song as "right under childbirth in terms of great events of my life".
The song was the only one to be recorded at Ginger Baker's studio in the Ikeja region of Lagos, Nigeria. Baker had hoped to entice Wings to record more songs at his ARC Studios, but only one session took place.
Source: The Beatles Bible
Photo Band On The Run album artwork - Paul McCartney & Wings