Sahih Muslim 967
The Book of Prayers
حَدَّثَنِي أَبُو الطَّاهِرِ، وَعَمْرُو بْنُ سَوَّادٍ، قَالاَ أَخْبَرَنَا ابْنُ وَهْبٍ، حَدَّثَنِي اللَّيْثُ بْنُ سَعْدٍ، عَنْ جَعْفَرِ بْنِ رَبِيعَةَ، عَنْ عَبْدِ الرَّحْمَنِ الأَعْرَجِ، عَنْ أَبِي هُرَيْرَةَ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ " لَيَنْتَهِيَنَّ أَقْوَامٌ عَنْ رَفْعِهِمْ أَبْصَارَهُمْ عِنْدَ الدُّعَاءِ فِي الصَّلاَةِ إِلَى السَّمَاءِ أَوْ لَتُخْطَفَنَّ أَبْصَارُهُمْ " .
Abu Huraira reported:People should avoid lifting their eyes towards the sky while supplicating in prayer, otherwise their eyes would be snatched away
Text from the public-domain hadith-api dataset. Numbering follows that dataset and can differ by a few from some printed editions — check the wording, not only the number.