The 96-year-old Prince will spend a second night in hospital Buckingham Palace have said.
After being kept in for two nights, he was photographed leaving King Edward VII's Hospital in Marylebone, central London, yesterday.
It said he was "in good spirits" and disappointed that he was forced to miss Wednesday's state opening of parliament and horse-racing at Royal Ascot.
There he stayed for two days with infectious disease.
The Duke of Edinburgh has left hospital after being treated for an infection. It followed a hospitalization in December 2011, when Prince Philip was found to have a blocked coronary artery and underwent a "minimally invasive" procedure of coronary stenting.
It is understood he fell ill at Windsor Castle on Tuesday night after attending the start of Ascot with the Queen.
Prince Philip said in May that he would retire from royal duties this autumn, a move supported by the Queen.
Outspoken, irascible and intensely private, Philip, a Greek-born former naval officer, has a reputation for brusque comments and occasional gaffes.
And observers say his quips put people at ease - while also providing a welcome contrast to the queen's seriousness.
To relieve his wife Queen Elizabeth II and all his royal family.
However, Prince Philip will honor engagements that were already scheduled until August.
"I reckon I've done my bit so I want to enjoy myself a bit now", he added, on his plans to wind down.
"He's getting better. He's getting better", he told reporters.