As for Tehran, Trump said, his only demand is that the country not pursue nuclear weapons and halts what the United States claims is backing for terrorist groups.
"The U.S. request for Iran is very simple," he wrote.
Iran insists that it does not have a nuclear weapons program and it signed onto an international pact in 2015 meant to ensure that its nuclear industry sticks to civilian uses. Trump pulled the United States out of the deal in 2017, seeking its collapse.
Trump's latest signalling of a pullback from what has long been a region featuring an intense US presence comes amid growing military tension between the United States and Iran.
On Friday, Trump called off a bombing strike on Iranian facilities that had been planned as retaliation for the downing by Iran of a US spy drone.
Earlier, mysterious attacks were carried out on oil tankers transiting the same area. They were blamed on Iran by Washington, although the Iranians say they were not involved.
Trump's tweets add to his record of seeking a wider drawdown of the US diplomatic and military footprint around the world.