By Agence France-Presse
The offer came during a phone conversation on Sunday night, part of a flurry of calls Trump made to Southeast Asian leaders over the weekend trying to shore up regional support over the troubled Korean peninsula.
On Sunday he extended a White House invitation to Philippines president Rodrigo Duterte, whose brutal anti-drugs campaign has claimed thousands of lives and led to warnings from rights groups about possible crimes against humanity.
"The Prime Minister thanked and accepted President Trump's invitation to visit the United States," junta spokesman Major General Werachon Sukhonhapatipak said in a statement, adding that the offer to visit had been reciprocated by Bangkok.
Thailand's former army chief Prayut Chan-O-Cha seized power three years ago, anointing himself prime minister and ushering in the kingdom's most autocratic government in a generation.
The coup strained ties with the Barack Obama administration as the military jailed dissidents, banned protests and ramped up prosecutions under the kingdom's draconian lese majeste law.
But the generals who now run Thailand -- a former staunch US ally that has moved closer to Beijing since the coup -- know they are now less likely to be berated for their dismal rights record under Trump, who has had much fewer qualms about embracing autocrats.
He also recently called Turkish president Recep Tayyip Erdogan to congratulate him on winning a controversial referendum that will dramatically increase his powers.
And Trump's rhetoric towards China, a popular punching bag during the campaign, has noticeably softened since his meeting with President Xi Jinping in Florida last month.
Many Southeast Asian nations have looked to the Trump administration with some trepidation.
He has shown little appetite for his predecessor's Asia "pivot" and he swiftly scrapped the TPP trade deal after taking office.
Trump is due to visit two regional summits -- in Vietnam and the Philippines -- towards the end of the year.
The Thai junta statement was light on specifics but said Trump "had confidence in the Thai government" and that the two countries were ready to "enhance bilateral cooperation in all dimensions".
Like Trump, the arch-royalist general Prayut enjoys berating the media and speaking off the cuff at length, including during weekly "Bringing Happiness Back to Thailand" speeches that are broadcast on all channels.