The Hadith as a proof:
Narrated `Abdullah bin `Abbas:
That he stayed overnight in the house of Maimuna the wife of the Prophet, his aunt. He added : I lay on the bed (cushion transversally) while Allah’s Messenger (ﷺ) and his wife lay in the lengthwise direction of the cushion. Allah’s Messenger (ﷺ) slept till the middle of the night, either a bit before or a bit after it and then woke up, rubbing the traces of sleep off his face with his hands. He then, recited the last ten verses of Sura Al-`Imran, got up and went to a hanging water-skin. He then Performed the ablution from it and it was a perfect ablution, and then stood up to offer the prayer. I, too, got up and did as the Prophet had done. Then I went and stood by his side. He placed his right hand on my head and caught my right ear and twisted it. He prayed two rak`at then two rak`at and two rak`at and then two rak`at and then two rak`at and then two rak`at (separately six times), and finally one rak`a (the witr). Then he lay down again in the bed till the Mu’adh-dhin came to him where upon the Prophet (ﷺ) got up, offered a two light rak`at prayer and went out and led the Fajr prayer.
حَدَّثَنَا إِسْمَاعِيلُ، قَالَ حَدَّثَنِي مَالِكٌ، عَنْ مَخْرَمَةَ بْنِ سُلَيْمَانَ، عَنْ كُرَيْبٍ، مَوْلَى ابْنِ عَبَّاسٍ أَنَّ عَبْدَ اللَّهِ بْنَ عَبَّاسٍ، أَخْبَرَهُ أَنَّهُ، بَاتَ لَيْلَةً عِنْدَ مَيْمُونَةَ زَوْجِ النَّبِيِّ صلى الله عليه وسلم وَهِيَ خَالَتُهُ فَاضْطَجَعْتُ فِي عَرْضِ الْوِسَادَةِ، وَاضْطَجَعَ رَسُولُ اللَّهِ صلى الله عليه وسلم وَأَهْلُهُ فِي طُولِهَا، فَنَامَ رَسُولُ اللَّهِ صلى الله عليه وسلم حَتَّى إِذَا انْتَصَفَ اللَّيْلُ، أَوْ قَبْلَهُ بِقَلِيلٍ أَوْ بَعْدَهُ بِقَلِيلٍ، اسْتَيْقَظَ رَسُولُ اللَّهِ صلى الله عليه وسلم فَجَلَسَ يَمْسَحُ النَّوْمَ عَنْ وَجْهِهِ بِيَدِهِ، ثُمَّ قَرَأَ الْعَشْرَ الآيَاتِ الْخَوَاتِمَ مِنْ سُورَةِ آلِ عِمْرَانَ، ثُمَّ قَامَ إِلَى شَنٍّ مُعَلَّقَةٍ، فَتَوَضَّأَ مِنْهَا فَأَحْسَنَ وُضُوءَهُ، ثُمَّ قَامَ يُصَلِّي. قَالَ ابْنُ عَبَّاسٍ فَقُمْتُ فَصَنَعْتُ مِثْلَ مَا صَنَعَ، ثُمَّ ذَهَبْتُ، فَقُمْتُ إِلَى جَنْبِه، فَوَضَعَ يَدَهُ الْيُمْنَى عَلَى رَأْسِي، وَأَخَذَ بِأُذُنِي الْيُمْنَى، يَفْتِلُهَا، فَصَلَّى رَكْعَتَيْنِ، ثُمَّ رَكْعَتَيْنِ، ثُمَّ رَكْعَتَيْنِ، ثُمَّ رَكْعَتَيْنِ، ثُمَّ رَكْعَتَيْنِ، ثُمَّ رَكْعَتَيْنِ، ثُمَّ أَوْتَرَ، ثُمَّ اضْطَجَعَ، حَتَّى أَتَاهُ الْمُؤَذِّنُ، فَقَامَ، فَصَلَّى رَكْعَتَيْنِ خَفِيفَتَيْنِ، ثُمَّ خَرَجَ فَصَلَّى الصُّبْحَ.
Reference :
Sahih al-Bukhari 183
In-book reference : Book 4, Hadith 49
USC-MSA web (English) reference : Vol. 1, Book 4, Hadith 183 (deprecated numbering scheme)
The benefit regarding where to stand and the explanation of the Hadith
بسم الله الرحمن الرحيم
Al-Imam al-Bukhari made a chapter in his Saheeh:
باب: يقوم عن يمين الإمام بحذائه سواء ، إذا كانا اثنين
Chapter: He stands on the right of the Imam next to him equally if those (praying) are two.
Al-Haafidh Ibnu Hajr mentioned rahimahullaah in Fath al-Baree (2/160):
The statement of (al-Bukhari in title of the chapter) “equally” it means he does not preceed (the imam) nor does he remain behind him.
And it is as if the author (al-Bukhari) is pointing towards what has come in some of the chains of narration in the hadeeth of Ibn Abbas; for indeed the wording (which is found in the hadeeth where Ibn Abbaas) said:
فقمت إلى جنبه
So I stood beside him (sallallahu alaihi wa sallam)
(And) what is apparently (intended) is (that they were) even or equal in position.
Note: the hadeeth which al-Haafidh is referring to has been reported by al-Bukhari (937) and Muslim (1283) on the authority of Ibn Abbas radhiallaahu Anhu.
Al-Imam al-Albani rahimahullaah also stated in as-Saheeha hadeeth number (2590):
The Sunnah is that the one praying follows the Imam whilst he is on the right side (of the Imam) and while he is equal to him, not in front of him nor behind him. In opposition to what is (found) in some schools of jurisprudence that it is befitting to remain behind the Imam just slightly by placing the toes of the feet equal to the heals of the Imam or similar to this.
We ask Allaah to benefit us by way of this small effort and all praise is due to Him Lord of all that exists.
Written by the brother
Mahmood al-Kanadi
Abu ‘Atiyah