Phelps later tweeted that he got a "pretty cool" personal phone call from Obama on Wednesday.
Phelps and his U.S. teammates won the 4x200 free relay Tuesday night in London. Phelps has now won 15 gold medals and 19 medals overall in his Olympic career, records for any individual athlete. He has said this year's Summer Olympics are his last.
Obama's Twitter feed is managed by his campaign, but tweets tagged "-bo" come directly from the president. In a tweet earlier this week, his campaign referred to U.S. swimmers as a means to tout the accomplishments of Obama's first term, posting a graphic boasting of the numbers of participants in swimming lessons and clubs supported by "Obama administration partnerships."
Updated at 1:40 p.m.