Volunteer diver Saman Gunan lost his life on 6 July while installing oxygen tanks in the flooded cave complex.
He has since been hailed as a hero around the world.
The boys and their 25-year-old coach were told of his sacrifice only on Saturday, when doctors decided they were strong enough to process the news.
"All cried and expressed their condolences by writing messages on a drawing of Lieutenant Commander Saman and observed one minute of silence for him," said Jedsada Chokdamrongsuk, permanent secretary at the health ministry.
Photos showed the "Wild Boars" football team, who are being monitored in hospital, gathered solemnly around a picture of the diver.
"They also thanked him and promised to be good boys," the health ministry said.
The boys, aged 11-16, were pulled from the cavern by Thai Navy Seals and foreign cave diving experts, in a three-day rescue push that ended on 10 July.
They are expected to leave Chiang Rai Prachanukroh Hospital on Thursday, though many are still on antibiotics.
They will be watched for signs of psychological distress, which may only become evident in the months to come. The boys have been advised against giving media interviews, which experts say could trigger a post-traumatic reaction.
The youngsters and their coach had been invited to the final of the 2018 World Cup by its organiser, Fifa, but had to decline on medical grounds.
As the live game will be broadcast quite late on Sunday 15 July (at 22:00 Thai time), doctors said they will enjoy a recording later.
The boys' nail-biting tragedy-turned-survival-story has been followed by millions worldwide since 23 June, when they walked into the Tham Luang cave after football practice - only to be trapped by monsoon floods.