A man from among the companions of the Prophet ﷺ told him that he heard the Messenger of Allah ﷺ say: 'If any one of you in praying, let him not lift his gaze to the sky, or his eyesight will be taken away.'" (Using translation from Nasāʾī 1194)
أَنَّ رَجُلًا مِنْ أَصْحَابِ النَّبِيِّ ﷺ حَدَّثَهُ أَنَّهُ سَمِعَ رَسُولَ اللهِ ﷺ يَقُولُ «إِذَا كَانَ أَحَدُكُمْ فِي الصَّلَاةِ فَلَا يَرْفَعُ بَصَرَهُ إِلَى السَّمَاءِ أَنْ يُلْتَمَعَ بَصَرُهُ»