Wa `Alaykum As-Salam Wa Rahmatullah Wa Barakatuh.
In the Name of Allah, Most Gracious, Most Merciful.
All thanks and praise are due to Allah and peace and blessings be upon His Messenger.
Dear questioner, thanks for this good question, and we would like to give you glad tidings of great reward in store for anyone who seeks knowledge and tries to get a better understanding of his religion. May Allah bestow His mercy on you for this and grant us all forgiveness, Amen.
As regards your question, we would like to cite for you the following fatwa issued by Sheikh Muhammad Saleh Al-Munajid, a prominent Saudi scholar, who states:
“The belief of Ahlu As-Sunnah Wal-Jama`ah (Adherents to the Prophet’s Tradition and Consensus of Muslim Community) is that there is torment and punishment in the grave and life in Al-Barzakh (the interval between death and the Day of Resurrection), and there is blessing and pleasure, according to the status of the deceased. The evidence for that is the verse that reads: “The Fire; they are exposed to it morning and evening; and on the day when the Hour upriseth (it is said): Cause Pharaoh's folk to enter the most awful doom." (Ghafir: 46)
In the above-mentioned verse, Allah states that the people of Pharaoh are exposed to torment morning and afternoon even though they are dead. From this verse, the scholars affirmed that the torment of the grave is real.
Ibn Katheer said: This verse is the main basis of the belief of Ahlu As-Sunnah as regard the torment of Al-Barzakh) as Allah states: “The Fire, they are exposed to it, morning and afternoon” (Ghafir: 46) (Tafseer Ibn Katheer, 4/82)
According to the hadith narrated by `A’ishah (may Allah be pleased with her) she said that the Prophet (peace and blessings be upon him) used to finish his prayer by saying: "O Allah, I seek refuge in You from the torment of the grave, I seek refuge in You from the tribulation of the Dajjaal (the Antichrist), I seek refuge in You from the trials of life and death, O Allah, I seek refuge in You from sin and ruin.” (Reported by al-Bukhari and Muslim)
The relevant point in this hadith is that the Prophet (peace and blessings be upon him) used to seek refuge with Allah from the torment of the grave. This is one of the pieces of evidence that confirm the torment of the grave. No one disputed the torment of the grave apart from the Mu`tazilah and some other groups whose views do not attract any consideration.
According to the most correct scholarly view, the torment of the grave befalls both the soul and the body. Sheikh Al-Islam Ibn Taymiyah (may Allah have mercy on him) said:
“The view of the Salaf (Ancestors) of this Ummah and its Imams is that the torment or blessing (of the grave) happens to the soul of the deceased and his body. After it departs the body, the soul continues to be blessed or punished, and it is also connected to the body from time to time, so that the blessing or torment reflects on the body as well as the soul.”
So we must believe in that which Allah has told us.” (al-Ikhtiyaaraat al-Fiqhiyyah, p. 94)
The scholars likened that to dreams, for when sleeping a person may dream that he is traveling, and he may feel happiness or grief and sorrow. Imagine that happening in this world, it is more apt that things should be different in the life of Al-Barzakh which is completely different from the life of this world and the life of the Hereafter.
An-Nawawi said: “If it is said, we see the deceased and how he is in his grave, so how can he be questioned, made to sit up and beaten with iron rods, when no mark is left on him? The answer is that this is not impossible, and indeed there is a similar case in our regular lives, that of the sleeper who feels joy or pain of which we feel nothing. A person who is awake may also feel joy or pain because of something he hears or thinks about, and those who are sitting with him feel nothing of that. Similarly, Jibreel used to come to the Prophet (peace and blessings be upon him) and tell him of the revelation, and the people present were unaware of it. All of that is clear and evident.” (Sharh Muslim, 17/201)
Sheikh Al-Islam Ibn Taymiyah said: “When a person sleeps, he may feel joy or pain, and that happens to his soul and his body. He may dream that someone is beating him and wake up with pain in his body, or he may dream that he is being fed some good food, then wake up with the food in his mouth. This is something that really happens. If the body and soul of a sleeping person experience joy and pain that are not felt by the person next to him, and a sleeper may even cry out because of the intensity of pain or fear of what is happening to him, and those who are awake can notice this, even hear him reciting Qur’an or Dhikr (remembrance of Allah), or talking though he is asleep with his eyes closed, and he does not hear them if they speak to him – then how can we deny that the one who is buried in his grave also feels things? How come we don’t believe the message of the Prophet (peace and blessings be upon him) when he said that a person buried in the grave hears the footsteps of his companions when they start to depart.
The heart is akin to the grave, hence the Prophet (peace and blessings be upon him) said, when he missed `Asr on the day of al-Khandaq: “May Allah fill their hearts and graves with fire.” And Allah differentiated between them (graves and hearts) in the verse that reads: “Knoweth he not that, when the contents of the graves are poured forth. And the secrets of the breasts are made known.” (Al-`Adiyat: 9-10) This is just to explain that this could happen.
We cannot say that the blessing or torment that the dead experiences in the grave is typically like that which a sleeper experiences when he dreams; the blessing or torment in the grave is more overwhelming and far-reaching; it is a real blessing and a real torment. But this example is given to show that this is possible, and to refute the idea of those who say that the dead person does not make any movement in his grave, and the soil does not change, and so on.
May Allah save us from the torment of the grave, may He guide us all to the Straight Path!Amen!
Almighty Allah knows best.