Narrated Anas bin Malik: The Prophet ﷺ said, "What is wrong with those people who look towards the sky during the prayer?" His talk grew stern while delivering this speech and he said, "They should stop (looking towards the sky during the prayer); otherwise their eyesight would be taken away".
Children should understand that when they are praying, they need to stay focused on their prayers and not get distracted by anything else around them. They should also be aware of how important it is to take care of their health and avoid doing anything that can harm them in any way, such as looking up at the sky for too long during prayer.