The People of Kahf during their long sleep were in a state that an onlooker would have taken them to be awake
The second state of the People of Kahf pointed out is that there were no signs of sleep on their bodies in spite of having been put to sleep for such a long period of time. In fact, they were in a condition that anyone who looked at them would think that they were awake. Generally, commentators say that their eyes were open. The body is relaxed in sleep but this relaxation was not there. The change in the momentum of breathing that comes upon the sleeping was also not there. It is obvious that this state too was nothing short of being extraordinary, a kind of Thaumaturgy (karamah), in which the apparent consideration of wisdom was their protection lest someone taking them to be asleep attacks them, or steals things with them. Then, the changing of sides to the right and the left could also give an onlooker the realization of their being awake. And then, there was a particular benefit as well in changing sides - in that the dust they were sleeping on does not eat into an unchanged side.
The dog of the People of Kahf
At this point, we have a question on our hands. It appears in an authentic Hadith that angels do not enter a house that has a dog or picture. Then, there is a Hadith of the Sahih of al-Bukhari. There, it has been reported on the authority of Sayyidna Ibn ` Umar ؓ that the Holy Prophet ﷺ said, "Whoever keeps a dog, except the one used for hunting or guarding livestock, has two qirats deducted every day from his reward (qirat or karat is the name of a small weight)." And in the report narrated by Sayyidna Abu Hurairah ؓ ، there is the exception of a third kind of dog, that is, a dog kept to guard land produce.
Based on these Hadith reports, one can ask as to why did these worthy men of Allah take a dog with them? One answer to this could be that the prohibition of keeping a dog is an injunction of the Shari'ah brought by the Holy Prophet ﷺ and it is possible that it may not be so prohibited in the Shari'ah (law) brought by Sayyidna ` Isa Masih (علیہ السلام) . Then, it is reasonably imaginable that these people who had property and livestock may have kept a dog for their protection from intruders and since the faithfulness of a dog is well known, the dog followed them when they went out from the city.
Good Company is a Blessing - Even for a dog!
Ibn ` Atiyyah says that his father told him that he heard a sermon of Abu al-Fadl Jawhari in the Hijrah year 469 at the Great Mosque of Egypt. Speaking on the Mimbar, he was telling everyone, 'whoever loves good people, he too gets a share from their goodness. See when the dog of the Ashab al-Kahf loved them and followed them closely as if appended with them, Allah Ta` ala mentioned it in the Qur’ an'.
Al-Qurtubi mentions this report of Ibn 'Atiyyah in his Tafsir. In his comments, he says when a dog can reach this station by being in the company of the righteous and the saintly, imagine how high the station of true believers and pure monotheists who love righteous men of Allah would be. In fact, there is comfort and good news in this event for Muslims who are weak in deeds but do love the Holy Prophet ﷺ fully and duly.
It has been reported in the Sahih of al-Bukhari that Sayyidna Anas ؓ said, "One day, I and the Holy Prophet ﷺ were coming out of the Masjid. We met a person at the door. He asked, Ya RasulAllah, when will the Qiyamah come?" He said, "What preparations have you already made for Qiyamah? (In view of which you want it to come soon)." Hearing this, the man was somewhat ashamed and corrected himself by saying, "I have not collected a lot of prayers, fasts and charities for Qiyamah, but I love Allah and His Messenger." He said, "If so, [ on the day of Qiyamah ] you shall be with those whom you love." Sayyidna Anas ؓ says, "when we heard this bliss of a sentence from the Holy Prophet ﷺ ، we were so happy that we had never been that happy since we embraced Islam."
After that, Sayyidna Anas ؓ said, "[ al-Hamdulillah ] I love Allah, His Messenger ﷺ ، Abu Bakr and ` Umar رضی اللہ تعالیٰ عنہما ، therefore, I look forward to being with them." (Qurtubi)
Allah Ta’ ala had invested the People of Kahf with such awe as would make an onlooker run in terror
The address in verse 18: لَوِ اطَّلَعْتَ عَلَيْهِمْ (If you had a look at them) is apparently to people at large. Therefore, it does not necessarily follow from it that the Holy Prophet ﷺ too could be filled up with awe generated by the state of the People of Kahf in their Cave. So, the address here is to common people. They are being told that, were they to cast a look at them in that state, they would have fled away from them in terror and the resulting awe of them would have gripped them all over.
What was the basis of this awe and what were the reasons for it? This is something in which debate is useless - therefore, the Qur'an, and Hadith have not explained it. The truth of the matter is that Allah Ta’ ala, in His wisdom, had created such conditions for their protection that the Sun stays away from their bodies, and the onlooker takes them to be awake and is filled with awe of them and is consequently unable to see them fully. It is possible to have these conditions prevail by way of particular physical causes as well as by way of an extraordinary input or as the working of wonder (karamah). Now, when the Qur'an and Hadith have not determined any particular reason for it, debating it with hollow conjectures is futile. Preferring this approach, Tafsir Mazhari cites Ibn Abi Shaibah, Ibn al-Mundhir and Ibn Abi Hatim in support. They have reported an event relating to Sayyidna ` Abdullah ibn ` Abbas ؓ who says: 'we waged a Jihad against Byzantine forces in the company of Sayyidna Mu` awiyah ؓ which is known as the battle of al-Madiq (المضیق). On this trip, we passed through the site of the Cave of the People of Kahf. The Qur’ an mentions it. Sayyidna Mu’ awiyah wanted to go into the Cave and see the bodies of the People of Kahf. Sayyidna Ibn ` Abbas ؓ said, 'let us not do so because Allah Ta` ala has already prohibited someone better than you from seeing them, that is, the Rasul of Allah.' Then, he recited this very verse: لَوِ اطَّلَعْتَ عَلَيْهِمْ (If you had a look at them, you would have fled from them and would have been filled with awe of them - 18). [ This tells us that, in the sight of Sayyidna ` Abdullah ibn ` Abbas ؓ ، the address in لَوِ اطَّلَعْتَ (If you had a look) was to the Holy Prophet ﷺ ] But, Sayyidna Mu` awiyah ؓ did not accept his opinion [ perhaps, because he may have taken the address as being to common people and not to the Holy Prophet ﷺ . Or, it may be that the Qur'an has portrayed the condition of the time when the People of Kahf were alive and asleep. Now a long time had passed since they died. It was not likely that they would still have the same atmosphere of awe around them ]. However, Sayyidna Mu` awiyah, with his position unchanged, sent a few men to find out the facts. But, when they stepped into the Cave, Allah Ta` ala sent a hot wind upon them because of which they could not see anything. (Mazhari) (This report was also referred earlier under The People of Kahf: Place and Period' )