The time for Taraaweeh prayer lasts from after âIshaâ until dawn comes, so it is valid to perform this prayer at any time during this period.
Al-Nawawi (may Allaah have mercy on him) said in al-Majmooâ:
The time of Taraaweeh prayer begins when âIshaâ prayer is over, as was stated by al-Baghawi and others, and it lasts until dawn comes.
But if a man is going to pray in the mosque as an imam leading the people in prayer, it is better to pray Taraaweeh after âIshaâ prayer and not to delay it until the middle or the end of the night, so that this will not cause hardship for the worshippers and some of them may sleep and miss the prayer. This is what the Muslims usually do, they pray Taraaweeh after âIshaâ and do not delay it.
Ibn Qudaamah said in al-Mughni:
It was said to Imam Ahmad: Will you delay qiyaam â i.e., Taraaweeh â until the end of the night? He said, No, the practice of the Muslims is dearer to me.
But for one who prays Taraaweeh at home, he has the choice: if he wants, he can pray it at the beginning of the night and if he wants he can pray it at the end. And Allaah knows best.