كتاب صلاة المسافرين وقصرها
6  
The Book of Prayer - Travellers
(16)
Chapter: It is permissible to offer voluntary prayers standing or sitting, and to stand and sit in the same rak`ah
(16)
باب جَوَازِ النَّافِلَةِ قَائِمًا وَقَاعِدًا وَفِعْلِ بَعْضِ الرَّكْعَةِ قَائِمًا وَبَعْضِهَا قَاعِدًا ‏
Sahih Muslim 734

Jabir b. Samura reported that the Messenger of Allah (ﷺ) observed (Nafl) prayer sitting before his death.

وَحَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا عُبَيْدُ اللَّهِ بْنُ مُوسَى، عَنْ حَسَنِ بْنِ صَالِحٍ، عَنْ سِمَاكٍ، قَالَ أَخْبَرَنِي جَابِرُ بْنُ سَمُرَةَ، أَنَّ النَّبِيَّ صلى الله عليه وسلم لَمْ يَمُتْ حَتَّى صَلَّى قَاعِدًا ‏.‏
Reference : Sahih Muslim 734
In-book reference : Book 6, Hadith 144
USC-MSA web (English) reference : Book 4, Hadith 1599
  (deprecated numbering scheme)