The hadith you are referring to is:
Masruq narrated that :
he asked Aishah about the Witr of the Prophet. She said: "He would perform Witr during all of the night; (either) its beginning, its middle, or its end. So when he died, his Witr ended, during the approach of As-Sahar." (Jami' at-Tirmidhi)
As for the meaning of:
So when he died
It should be clear that it refers to our prophet's() preference in the last days/weeks/months/years? of his life. However the translator has chosen to order the sentence and flip it differently than the Arabic original, which may create a certain doubt.
Al-Mubarakpuri quotes imam an-Nawawi's on this in his Tuhfat al-Ahwadhy
تحفة الأحوذي saying:
In the following I'm translating from Arabic language, as these translations are of my own take them carefully!
( فانتهى وتره حين مات في وجه السحر ) قال النووي : معناه كان آخر أمر الإيتار في السحر ، والمراد به آخر الليل كما قالت في الروايات لأخرى ، ففيه استحباب الإيتار آخر الليل وقد تظاهرت الأحاديث الصحيحة عليه ، قال وفيه جواز الإيتار في جميع أوقات الليل بعد دخول وقته ، انتهى ،(Source)
(So his witr ended, when he died, during the approach of as-Sahar) An Nawawi said:
Its meaning was the last preferred practice of performing Witr prayer till the end of as-Sahar, which means it is at the end of the night, as she said in other narrations, in which it is recommended to perform Witr prayer at the end of the night as it is mentioned in other narrations. This hadith indicates the desirability of performing Witr prayer at the end of the night, and the authentic hadiths have demonstrated it. He said, and in it is the permissibility of performing the Witr prayer at all times of the night, after the time for it begins. End quote.
This practice is also known and recommended from Sahih hadith:
Prayer during the night should consist of pairs of rak'ahs, but if one of you fears morning is near, he should pray one rak'ah which will make his prayer an odd number for him. (See for example in Sahih al-Bukhari and Sahih Muslim)