The Royal Thai Navy found them the sea lane between Hua Hin of Prachuap Khiri Khan and Koh Pai in Chon Buri province early on Friday, according to a Khao Sod report.
VAdm Veerapan Sukkon, First Naval Area commander, said he had been informed a boat was missing at 12.30pm on Thursday.
The navy deployed airplanes and HTMS Bangpakong on a search and rescue mission.
The team rescued the two men at 8am on Friday.
One of them was Prasit Pinyo, 77, the owner and captain, while the other was Tim Bunditsathien, 61.
The Prasert Sap 1 boat, which carries tourists between Koh Lan and Pattaya, set sail from Pattaya for repairs at Hua Hin.
The engine went dead on the way and water poured in so Mr Prasit called his wife for help.
The boat eventually sank and the two men were left stranded for almost 20 hours in rough seas.