During the short statement, he revealed his plan to officially resign as prime minister on Tuesday, paving the way for Theresa May to take up the role by Wednesday.
It's unclear whether the song was a happy or sad one.
This Alan Partridge parody account also pointed out similarities between between the clip and the series.
Although this person spoiled the fun and said it was "totally improv".
The theme tune from The West WingThe Star Wars theme tuneDon't know, don't careHe made up his own little ditty
David Cameron Was Caught Humming A Tune After Confirming His Last Day As PM
vote votesThe theme tune from The West Wing
vote votesThe Star Wars theme tune
vote votesDon't know, don't care
vote votesHe made up his own little ditty
Sara Spary is a consumer business correspondent for BuzzFeed News and is based in London.
Contact Sara Spary at email@example.com.
Got a confidential tip? Submit it here.