A rescue mission for a young Thai soccer team and their coach trapped in a flooded cave can expect its best chance yet of success in the next three or four days, the leader of the mission has said.

However, rescuers are also waging a "war with water and time" before expected heavy rains.

Narongsak Osottanakorn's cautious message of hope came a day after the death of a Thai rescue diver, a grim turn in what began two weeks ago as a celebration of one of the boys' birthdays at the Tham Luang cave complex in the northern province of Chiang Rai.

For the first time since they were found, the boys communicated by letter with their relatives - many camped outside the cave's entrance - with both homesickness and humour.

At the sprawling cave mouth, lines of frogmen and soldiers with torches could be seen emerging from the darkness, as generators chugged and pumped water out from blue nylon pipes.

Dozens of Royal Thai Army soldiers rested on rocks outside the cave, with two of them saying they had been told by superiors that the rescue operation would likely begin on Sunday or the day after.

Authorities tightened a security cordon, draping plastic sheets around the approach to the cave, further giving the sense that a rescue might be imminent.

Mr Narongsak, a former provincial governor, told reporters earlier that the next three to four days was "the best and most ideal time for the rescue operation."

"The current situation, with the air and water levels and the boys' health, is the best yet," he added.

"We're still at war with water and time. The discovery...was just a small victory."

Several monks in orange robes sat at a small shrine with two golden deer statues near the cave mouth, chanting, as a middle-aged woman knelt and prayed before them.

An assistant told Reuters the ceremony was to "open up" the cave mouth to allow for an easy and safe return for the boys.

Ivan Katadzic, a Danish diving instructor who has been ferrying oxygen tanks into the cave, said after a dive on Friday he was "double positive" about the mission because the water level had dropped considerably.

Mr Katadzic has not dived the final kilometre to where the boys are stranded on a muddy bank, the most dangerous part of the dive, during which rescuers have to hold their oxygen tanks in front of them to squeeze through submerged holes.

Alternative rescue plans include stocking the cave with supplies and an oxygen line to keep the boys alive for months until Thailand's monsoon season ends, or drilling a shaft down from the forest above.

Mr Narongsak said the drills would have to pierce 600m of fragile limestone rock to reach the boys and rescuers were discussing drilling angles.

Besides looking for possible holes from above, the team on the hill above is trying to block holes and divert streams that channel water into the cave before the weather turns.

"Everything is a race against time," said an official of the forest park where the cave complex is located.

His team would camp out on the hill to try and finish its work before the rain came, the offical said.