King Bhumibol Adulyadej had been in a Bangkok hospital since last October, when he had his gallbladder removed.
As the king left Siriraj Hospital with his wife, Queen Sirikit, throngs of well-wishers shouted "Long live their majesties."
Travelling in separate vans, the royal couple arrived at the Klaikangwon Palace in the coastal city of Hua Hin a few hours later.
Thais hold great affection for Bhumibol, who was crowned on May 5, 1950, after coming to the throne in 1946 following the death of his elder brother.
Bhumibol has faded from public life over the past several years, though, and on his rare outings looks visibly frail and does not speak publicly.
The king made a rare public appearance Tuesday at Bangkok's Grand Palace to mark the 65th anniversary of his coronation.
Bhumibol's near-disappearance from public life has coincided with a decade of political instability in Thailand. Worries about the king's health and succession have contributed to the instability.
The heir apparent, Crown Prince Vajiralongkorn, does not command the same respect and affection as the king.
