In a video message posted to his Twitter account after his seven-night hospital stay, Mr Johnson said: "I have today left hospital after a week in which the NHS has saved my life, no question.
"It's hard to find the words to express my debt."
The prime minister paid tribute to the "personal courage" of doctors, nurses, cleaners, cooks and all other healthcare workers at St Thomas' and named individual staff who had steered him away from danger over the past week.
He paid particular thanks to two nurses - Jenny from New Zealand and Luis from Portugal - who "stood by my bedside for 48 hours when things could have gone either way."
"The reason in the end my body did start to get enough oxygen was because for every second of the night they were watching and they were thinking and they were caring and making the interventions I needed," Mr Johnson said.
Earlier, British Prime Minister Boris Johnson was transferred to the intensive care unit of a London hospital after he exacerbated the symptoms of coronavirus, the Prime Minister’s Office on Downing Street stated, as the BBC reported.
"Mr. Johnson asked Foreign Minister Dominic Raab to replace him," Johnson’s spokesman said.
The day before, on Sunday, it became known that British Prime Minister Boris Johnson, who was diagnosed with coronavirus, was hospitalized.
The 55-year-old prime minister was admitted to St. Thomas’s hospital in London with “persistent symptoms” of coronavirus. Prior to this, he spent 10 days in isolation in his office, after March 26, when he became aware of his illness as a dangerous ailment.