It is narrated from Hazrat Anas (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) said: What is wrong with people that during prayer they raise their eyes towards the sky and look? The Prophet (peace and blessings be upon him) strongly forbade this and said: People should refrain from this, otherwise their eyesight will be taken away.
Hadith Referenceمسند احمد / مسند المكثرين من الصحابة / 13710