Please read with me this Sahih Hadith from Bukhari (Book #23, Hadith #374):
Narrated Anas bin Malik: We were (in the funeral procession) of one of the daughters of the Prophet and he was sitting by the side of the grave. I saw his eyes shedding tears. He said, "Is there anyone among you who did not have sexual relations with his wife last night?" Abu Talha replied in the affirmative. And so the Prophet told him to get down in the grave. And so he got down in her grave.
While reading this hadith, one is left to wonders why Prophet Muhammad asked Abu Talha to get down in the grave, and why Muhammad asked about the sexual relations matter before that. One may think that Muhammad asked Abu Talha to go down in the grave to have sexual relations with a dead person.
However, our confusion is put to rest after reading another similar hadith but contains more information. Here it is from Bukhari (Book #23, Hadith #426):
Narrated Anas: We were in the funeral procession of the daughter of Allah's Apostle and Allah's Apostle was sitting near the grave and I saw his eyes full of tears. He said, "Is there anyone amongst you who did not have sexual relations with his wife last night?" Abu Talha replied in the affirmative. And so Allah's Apostle told him to get down in her grave and he got down in her grave and buried her.
Now the story seems at first instant to be complete. Why did Abu Talha go down in the grave? And the answer is "in order to bury the dead person". A slab of fresh air hits the neighborhood, and our confusion about those two hadiths is gone. Or does it?
Let us review what happens in a gravesite: the dead person is lowered in his/her grave. Someone may go down in the grave to adjust the position of the deceased person. But to bury that person, one has to be out of the grave. This will allow dirt to be poured on the dead person from above the grave, and not while in the grave.
Please re-read the above two hadiths again, and you’ll see the problem. So, it seems that the phrase "and buried her" in the second hadith was a modification done at a much later time, a time when asking someone to go down in the grave if their sexual encounter with their wives was not very recent became an unacceptable social behavior.
It is evident that Abu Talha performed something else in the grave; something other than "burying".
What is it that he performed? I have no answer to that question. However, it must have been related, in some way, to him not having sexual relations the previous night. Maybe some other hadiths can give us a clue. As for now, I have no answer to this question. Does anyone amongst the readers?