Trump was speaking in Vietnam, which has become the most vocal opponent of China's claims and its construction and militarisation of artificial islands in the sea. About $3-trillion in goods passes through the sea each year.
"If I can help mediate or arbitrate, please let me know," Trump said in comments at a meeting in Hanoi with Vietnam's president, Tran Dai Quang.
Trump acknowledged that China's position on the South China Sea was a problem.
"I'm a very good mediator and arbitrator," he said.
President Quang said Vietnam believed in handling disputes on the South China Sea through peaceful negotiations and on the basis of international laws - which Vietnam says nullify China's claims.
Vietnam has reclaimed land around reefs and islets, but on nowhere near the same scale as China. Brunei, Malaysia, the Philippines and Taiwan also have claims in the sea.
Since Philippine President Rodrigo Duterte has grown closer to China, Vietnam has emerged as China's main challenger in the region. In July, China pressured Vietnam to stop oil drilling in a disputed area, taking relations to a low.
Relations have since improved and Chinese President Xi Jinping is visiting Hanoi later on Sunday.
The South China Sea was discussed in Beijing on an earlier leg of Trump's 12-day Asian tour and US Secretary of State Rex Tillerson said the United States and China had a frank exchange of views.
The United States has angered China with freedom of navigation patrols close to Chinese-controlled islands.
CODE OF CONDUCT
The framework seeks to advance a 2002 Declaration of Conduct (DOC) of Parties in the South China Sea, which has mostly been ignored by claimant states, particularly China, which has built seven man-made islands in disputed waters, three of them equipped with runways, surface-to-air missiles and radars.
All parties say the framework is only an outline for how the code will be established and critics raise doubts about how effective the pact will be.
The framework will be endorsed by China and members of the Association of Southeast Asian Nations (ASEAN) at a summit in Manila on Monday, a diplomat from one of the regional bloc's countries said.
The next step is for ASEAN and China to start formal consultations and negotiations for the actual Code of Conduct, and the earliest that talks on this can start is February 2018, the diplomat said.
From Vietnam, Trump flies to the Philippines for a meeting with ASEAN leaders before he heads back to Washington.
Relations between Vietnam and the United States have blossomed in the decades since their war ended in 1975. A recent survey put the favourability of the United States at 84 percent among Vietnamese.
But Vietnam's trade surplus remains an irritant for the Trump administration. At $32 billion last year, it was the sixth largest with the United States, though less than a tenth the size of China's.
"We want to get that straightened out very quickly," Trump said at a meeting with Prime Minister Nguyen Xuan Phuc.
(Writing by Matthew Tostevin; Editing by Clarence Fernandez)
(Except for the headline, this story has not been edited by NDTV staff and is published from a syndicated feed.)
Get the latest election news, live updates and election schedule for Lok Sabha Elections 2019 on ndtv.com/elections. Like us on Facebook or follow us on Twitter and Instagram for updates from each of the 543 parliamentary seats for the 2019 Indian general elections.