Doctors said on Thursday that the boys are recovering well from infections they suffered during the 17-day ordeal, and earlier consented to the first footage of the children being broadcast around the world.
The clean-up at the Tham Luang cave complex continues, with the site not expected to reopen to the public for at least six months.
“Make the most of your lives. Be good people, be a force for good for your country,” Rear Admiral Apakorn Yuukongkaew said in a message to the boys, before he boarded a flight.
He added: “Hooyah,” the military rallying cry that has been picked up and adopted by a nation in Thailand, as they followed every update on the rescue issued by the Seals online.
Health officials said the boys would spend at least a week in hospital and about 30 days recovering at home. The video of them, released late on Wednesday, showed smiling patients wearing face masks and hospital gowns, giving peace signs to the camera.
The boys’ families have at last been given permission to visit them, albeit wearing protective gowns and masks. The two boys rescued in the first group on Sunday who were diagnosed with a lung infection were recovering well, the Thai health ministry said, while three boys from the last group have ear infections.
Elsewhere on Thursday, Thai navy Seals arriving back at the U-Tapao civil-military airport in Rayong province, near their home base, were given a heroes’ welcome when they touched down.
Those involved in the rescue were give large garlands made from marigolds as navy officers and proud civilians stood by. Some well-wishers at the air base prepared red roses.
“All Thais are proud of you ... You have made a name for the Seals unit,” a senior navy official told those gathered.
And in London, one of the world-leading British volunteer divers involved in the rescue played down his heroics as he touched down at Heathrow.
There have been calls for John Volanthen and Rick Stanton to be honoured after they were the first divers to reach the stranded group after more than nine days lost and uncontactable in the underground network of twisting tunnels and chambers.
Mr Volanthen, an IT consultant in his forties, spoke of the “relief” he felt at seeing the boys rescued and was modest about his part in the extraordinary feat.
“We were very pleased and we were very relieved that they were all alive but I think at that point we realised the enormity of the situation and that’s perhaps why it took a while to get them all out,” he told Sky News.
He added: “We are not heroes. What we do is very calculating, very calm. It’s quite the opposite.”
Mr Volanthen also paid tribute to Thai navy diver Saman Kunan, who died while replenishing oxygen canisters, saying his death brought a “bittersweet” taste to an otherwise “excellent” operation.
Mr Kunan is to receive a royal-sponsored funeral ceremony. In an Instagram tribute on Thursday, his wife Valeepoan Kunan wrote: “I love you so much.”
“I miss you,” she added. “I love you like you are my very heart...from now on when I wake up...who will I kiss?”
During the rescue, some Thais said on social media that the soccer team had been reckless in entering the cave during the monsoon season. But Ms Kunan absolved them of responsibility. She told reporters: “I want to tell the boys; please don’t blame yourselves.”