The Torment and Bliss of the Grave
The creed of the early generations of the Muslim community and its leading scholars holds that when a person dies he will enter either a state of bliss or of torment, and that this reaches both his soul and his body. The soul remains after leaving the body, enjoying felicity or undergoing punishment, and at times it is re-attached to the body so that the body shares in that pleasure or pain.
Ahl al-Sunnah wa-l-Jamāʿah are agreed that the soul may be blessed or punished while separate from the body, and may likewise be blessed or punished while joined to the body, with the body then linked to it. In that case, reward or torment befalls them both together, just as reward or torment may befall the soul alone when it is apart from the body.
As for whether bliss or punishment can reach the body when the soul is not attached to it, there are two famous opinions on the matter among the scholars of hadith and Sunnah and among the scholastic theologians.