A father and his two young sons spent a night adrift before being rescued off the coast of the island of Koh Samui.