كتاب الجنائز
11  
The Book of Prayer - Funerals
(27)
Chapter: Where the Imam should stand in relation to the deceased when performing the funeral prayer
(27)
باب أَيْنَ يَقُومُ الإِمَامُ مِنَ الْمَيِّتِ لِلصَّلاَةِ عَلَيْهِ ‏‏
Sahih Muslim 964 c

Samura b. Jundub said:

I was a young boy during the time of the Prophet (ﷺ) and I retained in my mind (what I learnt from him), and nothing restrained me from speaking except the fact that there were persons far more advanced in age than I. Verily, I said prayer behind the Messenger of Allah (ﷺ) over a woman who had died in the state of delivery, and the Messenger of Allah (ﷺ) stood up to say prayer in front of the middle part of her body. And in the tradition narrated on the authority of Ibn Muthanna the words are:" (The Holy Prophet) stood in the middle part of her body for offering prayer for her."
وَحَدَّثَنَا مُحَمَّدُ بْنُ الْمُثَنَّى، وَعُقْبَةُ بْنُ مُكْرَمٍ الْعَمِّيُّ، قَالاَ حَدَّثَنَا ابْنُ أَبِي عَدِيٍّ، عَنْ حُسَيْنٍ، عَنْ عَبْدِ اللَّهِ بْنِ بُرَيْدَةَ، قَالَ قَالَ سَمُرَةُ بْنُ جُنْدُبٍ لَقَدْ كُنْتُ عَلَى عَهْدِ رَسُولِ اللَّهِ صلى الله عليه وسلم غُلاَمًا فَكُنْتُ أَحْفَظُ عَنْهُ فَمَا يَمْنَعُنِي مِنَ الْقَوْلِ إِلاَّ أَنَّ هَا هُنَا رِجَالاً هُمْ أَسَنُّ مِنِّي وَقَدْ صَلَّيْتُ وَرَاءَ رَسُولِ اللَّهِ صلى الله عليه وسلم عَلَى امْرَأَةٍ مَاتَتْ فِي نِفَاسِهَا فَقَامَ عَلَيْهَا رَسُولُ اللَّهِ صلى الله عليه وسلم فِي الصَّلاَةِ وَسَطَهَا ‏.‏ وَفِي رِوَايَةِ ابْنِ الْمُثَنَّى قَالَ حَدَّثَنِي عَبْدُ اللَّهِ بْنُ بُرَيْدَةَ قَالَ فَقَامَ عَلَيْهَا لِلصَّلاَةِ وَسَطَهَا ‏.‏
Reference : Sahih Muslim 964c
In-book reference : Book 11, Hadith 114
USC-MSA web (English) reference : Book 4, Hadith 2109
  (deprecated numbering scheme)