The Book of the Prohibited actions

Riyad as-Salihin · Chapter 340

Prohibition of raising one's Eyes towards the sky during As-Salat (The Prayer)

باب النهي عن رفع البَصَر إِلَى السماء في الصلاة

In prayer the worshipper stands before Allah, and where the eyes lift the heart can wander after them. This short chapter warns against raising the gaze toward the sky during Salat.

The single hadith carries a firm warning to keep the eyes lowered and present. The lesson is reverence: holding our gaze in its place as a sign of humility before our Lord.

Hadith 1754

Anas bin Malik (May Allah be pleased with him) said:

عن أنس بن مالك قَالَ : قَالَ رسولُ اللهِ : « مَا بَالُ أقْوامٍ يَرْفَعُونَ أبْصَارَهُمْ إِلَى السَّمَاءِ في صَلاَتِهِمْ » ! فَاشْتَدَّ قَولُهُ في ذَلِكَ حَتَّى قَالَ : « لَيَنْتَهُنَّ عَنْ ذَلِكَ ، أَوْ لَتُخطفَنَّ أَبْصَارُهُمْ » ! . رواه البخاري

The Messenger of Allah (ﷺ) said, "How is it that some people raise their eyes towards the sky during As-Salat (the prayer)?" He stressed (this point) and added, "People must refrain from raising their eyes towards heaven in Salat (prayer), or else their sights will certainly be snatched away." [Al-Bukhari].

In plain words

The Prophet sternly questioned why some people lift their eyes toward the sky in prayer, warning them to stop. It teaches us to keep the gaze lowered and humble while we stand before Allah.

Reference : Riyad as-Salihin 1754 In-book reference : Book 17, Hadith 244