Language:
كتاب التقصير
18  
Shortening the Prayers (At-Taqseer)
(20)
Chapter: Whoever starts his Salat sitting (because of ailment) and then during the Salat (prayer) feels better, can finish the rest while standing
(20)
باب إِذَا صَلَّى قَاعِدًا ثُمَّ صَحَّ أَوْ وَجَدَ خِفَّةً تَمَّمَ مَا بَقِيَ
Sahih al-Bukhari 1119

Narrated `Aisha:

(the mother of the faithful believers) Allah's Messenger (ﷺ) (in his last days) used to pray sitting. He would recite while sitting, and when thirty or forty verses remained from the recitation he would get up and recite them while standing and then he would bow and prostrate. He used to do the same in the second rak`a. After finishing the Prayer he used to look at me and if I was awake he would talk to me and if I was asleep, he would lie down.

حَدَّثَنَا عَبْدُ اللَّهِ بْنُ يُوسُفَ، قَالَ أَخْبَرَنَا مَالِكٌ، عَنْ عَبْدِ اللَّهِ بْنِ يَزِيدَ، وَأَبِي النَّضْرِ، مَوْلَى عُمَرَ بْنِ عُبَيْدِ اللَّهِ عَنْ أَبِي سَلَمَةَ بْنِ عَبْدِ الرَّحْمَنِ، عَنْ عَائِشَةَ أُمِّ الْمُؤْمِنِينَ ـ رضى الله عنها ـ أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم كَانَ يُصَلِّي جَالِسًا فَيَقْرَأُ وَهْوَ جَالِسٌ، فَإِذَا بَقِيَ مِنْ قِرَاءَتِهِ نَحْوٌ مِنْ ثَلاَثِينَ أَوْ أَرْبَعِينَ آيَةً قَامَ فَقَرَأَهَا وَهْوَ قَائِمٌ، ثُمَّ يَرْكَعُ ثُمَّ يَسْجُدُ، يَفْعَلُ فِي الرَّكْعَةِ الثَّانِيَةِ مِثْلَ ذَلِكَ، فَإِذَا قَضَى صَلاَتَهُ نَظَرَ، فَإِنْ كُنْتُ يَقْظَى تَحَدَّثَ مَعِي، وَإِنْ كُنْتُ نَائِمَةً اضْطَجَعَ‏.‏
Reference : Sahih al-Bukhari 1119
In-book reference : Book 18, Hadith 39
USC-MSA web (English) reference : Vol. 2, Book 20, Hadith 220
  (deprecated numbering scheme)