The Prince’s informal attire showed that “some foreign leaders are looking ahead”, the outgoing president mused at the White House Correspondents’ Dinner, joking that it was a “clear breach of protocol”.
It was the final time Mr Obama would address the star-studded event, which traditionally sees the president deliver a speech poking fun at himself and others.
The Queen, David Cameron and Shakespeare provided material for Saturday’s witty set, which was executed with the skill expected from an orator with eight years’ experience as a global leader.
Photos of the Prince in his pyjamas meeting the president and wife Michelle were broadcast around the world after the couple spent an evening with the Duke and Duchess of Cambridge at Kensington Palace during their official visit.
Mr Obama described George, two, as “adorable” , but suggested light-heartedly that the young royal’s attire held broader significance. He quipped to laughter that being greeted by George in his checked pyjamas and monogrammed dressing-gown bathrobe was a slight akin to Republican leaders no longer answering his phone calls, a sign that attention is elsewhere as he prepares to leave office later this year.
He said: “It’s not just Congress. Even some foreign leaders have been anticipating my departure. Last week Prince George showed up to our meeting in his bath robe. That was a slap in the face. A clear breach of protocol.”
The Prince was allowed to stay up late to meet the president and First Lady, showing them the rocking horse they gave him when he was born.During the trip in April, the Obamas met the Queen, Prime Minister David Cameron – who played golf with Mr Obama – and visited Shakespeare’s Globe.
The occasions provided material for another pithy gag by the beaming African-American leader.
He said: “While in England I did have lunch with Her Majesty the Queen, took in a performance of Shakespeare, hit the links with David Cameron.
“Just in case anybody is still debating whether I am black or not, I think that settles the debate.”
In previous years, the president’s speech at the correspondents’ dinner has been delivered with humour and withering put-downs.
Mr Obama once famously ridiculed presidential hopeful Donald Trump over the tycoon’s public questioning of his birth certificate.
Dame Helen Mirren also received a special, if brief, mention in the President’s speech. He said: “I don’t have a joke here – I just think Helen Mirren is awesome.”
Democratic presidential candidate Bernie Sanders, vice president Joe Biden, secretary of state John Kerry and former New York mayor Michael Bloomberg were among the political big-hitters to turn out for Mr Obama’s final appearance at the event.
Mr Trump did not attend, although his son and daughter-in-law, Donald Jr and Vanessa Trump, were spotted on the red carpet.