Aung San Suu Kyi, Myanmar's imprisoned pro-democracy leader, continues to be held under house arrest, which was extended after Yettaw swam to her Yangon home in May.
Webb, a US Democratic senator, secured Yettaw's release after talks with General Than Shew, Myanmar's military ruler.
He also met Suu Kyi, becoming the first foreign official permitted to see her since she was sentenced to 18 more months of house arrest on Tuesday.
"I am grateful to the Myanmar government," Webb was quoted as saying in a statement released by his office.
"It is my hope that we can take advantage of these gestures as a way to begin laying a foundation of goodwill and confidence-building in the future."
Later, he told a news conference in Bangkok: "What he [Yettaw] did was regrettable, I believe that it was hurtful to the person he was trying to help.
"But at the same time on humanitarian grounds I feel fortunate that the government honoured my request to let him come back to Thailand with me."
Myanmar's military leaders have kept Suu Kyi under house arrest for most of the last two decades.
Yettaw, a diabetic and epileptic former military veteran, was arrested on May 6 after using a pair of home-made flippers to swim uninvited across a lake from the Nobel peace laureate's house, where he had spent two days.
A devout Mormon, he said at his trial that he was on a "mission from God" to warn Suu Kyi that he had had a vision in which she was assassinated by terrorists.
Her lawyers earlier described him as a "fool".
Webb, who is now the highest level American official to meet Myanmar's military rulers, has come under criticism himself for not doing enough to secure Suu Kyi's release.
But activists defended the senator's visit.
"There is only so much [Webb] can do, I think it was probably seen as quite an achievement to have seen her," Maureen Aung Thwin, director of the Burma Project Southeast Asia Initiative, told Al Jazeera.
She said Webb's visit "puts the spotlight back on her, the country and the 2,100 political prisoners who are still incarcerated who should be released".
Webb said that in his meetings with Myanmar's ruling generals he urged them to free Suu Kyi.