The two collaborated on a number of occasions, having begun their friendship shortly after The Office debuted in 2001, and continuing to email each other right up until the singer’s death.
Bowie later appeared on the sitcom Extras in 2006, in an episode that saw Gervais’ Andy Millman bump into Bowie at a bar during a crisis of confidence. Their interaction results in Bowie taking to a piano and making up a song making fun of “funny little fat man” Andy.
During a recent appearance on the Stick to Football podcast, Gervais recalled their time on set. “One of the best days of my life,” he said. “Because he was a hero of mine. Properly my hero, I’d say.”
https://www.instagram.com/reel/DC9NsTbI7tm
When he was asked if Bowie wrote the song, Gervais explained the ‘Starman’ musician only wrote the music. “In fact, I remember I sent him the lyrics, and I called him up and said ‘Did you get the lyrics’ and he went ‘Yeah, yeah’. And I said give me something sort of retro, like ‘Life On Mars’. And he went ‘Oh yeah, I’ll knock off a quick fucking ‘Life On Mars’ for you’.
“I realised that was so insulting. He’s doing my little sitcom and [I’m asking him] do your opus. I just sort of laughed, and then he came and he was just really funny. He was really charming, really smart, really funny.”
source: https://www.nme.com/