"His Royal Highness would like to thank everyone who sent their good wishes," Buckingham Palace said in a statement.
Prince Philip was admitted Friday for the condition, but Buckingham Palace never specified it or detailed what procedure, if any, he underwent at the hospital. He formally retired from public duties two years ago.
Prince Philip has faced a number of health challenges in recent years. He was involved in a car accident in January, but did not require hospitalization.
King Edward VII's Hospital, a private facility, has been treating Britain's royal family for decades.