The US President described the First Lady as “incredible” as he thanked people for their thoughts and wishes after her time in hospital.
The 48-year-old Slovene had been treated for a kidney condition at the Walter Reed National Military Medical Center in Maryland, just outside Washington.
Mr Trump said on Twitter: Great to have our incredible First Lady back home in the White House.
“Melanie is feeling and doing very well. Thank you for all your prayers and best wishes!”
The tweet was deleted quickly but not before dozens of people retweeted it.
It was soon replaced by another that spelled her name correctly.
Great to have our incredible First Lady back home in the White House. Melania is feeling and doing really well. Thank you for all of your prayers and best wishes!
— Donald J. Trump (@realDonaldTrump) May 19, 2018
Melania Trump had an “embolisation procedure to treat a benign kidney condition”, according to a statement.
Mr Trump said while she was in hospital that he planning to visit his wife.
But her quiet return to the White House after five days at the hospital has resolved a brewing mystery about when she would eventually be released.
On Monday, her spokeswoman Stephanie Grisham said that the procedure was “successful”, there were no complications and Mrs Trump would probably remain in hospital for “the duration of the week”.
The president then tweeted on Tuesday that his wife would be released in “two or three” days, and the First Lady said on Wednesday on Twitter that she was “feeling great” and looking forward to going home.
But there was no word about her whereabouts on Thursday and Friday.
The White House has refused to give out many details, citing her right to privacy.
Ms Grisham said on Saturday: “The First Lady returned home to the White House this morning.
“She is resting comfortably and remains in high spirits. Our office has received thousands of calls and emails wishing Mrs Trump well, and we thank everyone who has taken the time to reach out.”
There had been no indication during her public appearances in recent weeks, including during a state visit by France’s president, that the First Lady had been feeling unwell.
Social media has been alive with conspiracy theories over Mrs Trump’s role in the White House following rumours she was not happy her husband had been elected.
More from US
Gunman shouted ‘surprise’ before Texas school shooting
US school shootings: A deadly history
Kilauea volcano: Hawaiians warned of ‘powerful’ eruptions within hours
Michael Curry: The passionate bishop who dazzled the wedding congregation
Royal wedding: Meghan’s hometown celebrates ‘inspiring’ marriage to Harry
GQ mocks Vanity Fair over its ‘extra limbs’ photoshoot
The most recent included claims a body double was used while Mr Trump was speaking on the White House lawn.
There was also some disquiet expressed last month when he admitted he was “too busy” to buy her a present for her birthday.