Sayyiduna Abdullah bin Umar (may Allah be pleased with them both) narrates this statement of the Prophet (peace and blessings be upon him): "Do not raise your gaze towards the sky during prayer, lest it be taken away." The narrator says: That is, do not do this during prayer.
Hadith Referenceصحیح ابن حبان / كتاب الصلاة / 2281
Hadith Gradingفضيلة الشيخ الإمام محمد ناصر الدين الألبانيصحيح - «التعليق الرغيب» (1/ 188).فضيلة الشيخ العلّامة شُعيب الأرناؤوطإسماعيل بن أبي أويس في حفظه شيء، لكنه متابع، وباقي السند رجاله رجال الشيخين.