The trio were arrested in June in Kantharalak District, near the disputed border with Cambodia, amid a territorial row between Thailand and its neighbour.
Police said at the time that they were carrying maps with military facilities marked on them, and two of the men were using the illegal stimulant methamphetamine.
The Thai was jailed for two years and four months while the Cambodian was handed two years and three months and the Vietnamese received two years, Kantharalak District Court Director Thongchanai Kothajit said by telephone.
The Thai and the Cambodian received longer sentences for drug charges.
The Thai-Cambodian border row saw 28 people killed in two outbreaks of fierce fighting earlier this year.
After the three men were detained, Thailand’s then premier Abhisit Vejjajiva accused Phnom Penh of “violating Thai territory”, but Cambodia accused Bangkok of “deceitful fabrication”.
Phnom Penh denies the Cambodian man, Ung Kimthai, was a spy.
“Cambodia doesn’t need to send Mr Ung Kimthai to spy in Thailand,” foreign ministry spokesman Koy Kuong told AFP in Phnom Penh.
Earlier this year, a Cambodian court jailed a high-profile Thai nationalist activist arrested at the border for eight years on spying and illegal entry charges, while six other Thais received lighter sentences.
Tensions between the two countries have eased since a July election victory by allies of ousted ex-leader Thaksin Shinawatra, who is a friend of Cambodian Prime Minister Hun Sen.
Cambodia in May launched a legal bid at the International Court of Justice in the Hague seeking to force Thailand to pull troops from a disputed strip of land near the 900-year-old Preah Vihear temple.
The court ruled in 1962 that the temple itself belonged to Cambodia but both Phnom Penh and Bangkok claim ownership of a 4.6-square-kilometre (1.8-square-mile) patch of nearby territory.
PHNOM PENH, June 11, 2011 (AFP) – Cambodia has accused Thailand of “deceitful fabrication” after Thai police arrested three men on suspicion of spying near the neighbours’ disputed border.
BANGKOK, June 10, 2011 (AFP) – Thailand has arrested three men on suspicion of spying near its disputed border with Cambodia, accusing its neighbour Friday of “violating” its territory.