God’s Messenger was reciting as-Sajda (Al-Qur’an; 32) when we were with him. He was prostrating himself and we were doing so along with him, but we were so crowded that none of us could find a place for his forehead when prostrating himself.
A prostration when reciting Sad (Al-Qur’an; 38) is not one of those which are divinely commanded, but I have seen the Prophet prostrate himself when it was recited. In a version Mujahid said that he asked Ibn ‘Abbas whether he should prostrate himself when reciting Sad, whereupon he recited, “And among his progeny David and Solomon . . . so copy the guidance they received,” (Al-Qur’an; 6:84-90) and said, “Your prophet was one of those who were commanded to copy them.”
We prostrated ourselves along with the Prophet on account of “When the sky is rent asunder”, Al-Qur’an; 84) and “Recite in the name of your Lord” (Al-Qur’an; 96).