Until the end of the night, and his qiyam would be at the beginning of the night, as in the hadith of Sa'd ibn al-Musayyib, that the Prophet ﷺ asked Abu Bakr, may Allah be pleased with him, about his night prayer, and he said: I pray witr before I sleep.