The Messenger of Allah ﷺ said, "Whoever among you fears he will not wake at the end of the night, let him pray witr at its beginning. Whoever among you is confident he will wake at the end of the night, let him pray witr at its end, for prayer at the end of the night is witnessed, and it is more excellent."
حدثنا وكيع حدثنا ابن أبي ليلى عن أبي الزبير
قال رسول الله ﷺ من ظن منكم أن لا يستيقظ آخره فليوتر أوله ومن ظن منكم أنه يستيقظ آخره فليوتر آخره فإن صلاة آخر الليل محضورة وهي أفضل