Sanders, 36, is the third woman to have served as White House Press Secretary and is one of Trump's closest aides.
".... She is a very special person with extraordinary talents, who has done an incredible job! I hope she decides to run for Governor of Arkansas - she would be fantastic. Sarah, thank you for a job well done!" he said in another tweet.
Sanders said her role had been "the honour of a lifetime".
"I am blessed and forever grateful to @realDonaldTrump for the opportunity to serve and proud of everything he's accomplished. I love the President and my job. The most important job I'll ever have is being a mom to my kids and it's time for us to go home. Thank you Mr. President!" she tweeted.
Speaking to an event at the White House on Thursday, Trump said that Sanders will join the private sector, while weighing in on the possibility that she will run for Governor of Arkansas, a position that her father Mike Huckabee held from 1996 to 2007.
"We've been through a lot together. She's tough, and she's good. If we can get her to run for the Governor of Arkansas, I think she'll do very well," Trump said.
Sanders, who later spoke briefly at the podium, called her tenure "truly the most special experience", vowing to continue to be "one of most outspoken and loyal supporters" of Trump and his agenda, Xinhua news agency reported.
But she did not comment on the President's suggestion that she might run for office.
A senior adviser for Trump's 2016 presidential campaign, Sanders was named to the position of Deputy White House Press Secretary after the Republican's victory in the election.
She was promoted to White House Press Secretary following the resignation of Sean Spicer in July 2017.
During her tenure, there has been a decline in the number of White House press briefings, as the President answers questions from reporters on a near-daily basis.
Sanders' last briefing was more 90 days ago but she often gave press gaggles on the White House driveway after she had been interviewed by news outlets.
Her relationship with the press corps became particularly strained a year ago after comedian Michelle Wolf took a shot at her during the annual dinner of the White House Correspondents' Association.
"She burns facts and then she uses that ash to create a perfect smokey eye," Wolf had said at the event.