Assalamualaikum ustaz. Some people will intentionally delay their Isya’ prayer so that they can perform Qiyamullail or tahajjud. What is the ruling for this? Hope for an explanation.
Alhamdulillah, praise and gratitude to Allah SWT for His countless blessings for us all. Praise and salutations to our beloved Prophet Muhammad PBUH, his family, companions and all those who follow his footsteps until the Last Day.
Basically, tahajjud means the act of staying up at night and leaving sleep. Hence, it means the prayer is performed at night after sleep. Or in other words, Qiyamullail (establishing the night). It is also said the naming qiyamullail is also for prayer performed at night before sleep. The tahajjud terminology means: Sunnah prayer at night after sleep. 
Tahajjud prayer has a special status in Islam. Narrated from Abu Hurairah RA, the Prophet PBUH said:
وَأَفْضَلُ الصَّلَاةِ بَعْدَ الْفَرِيضَةِ؛ صَلَاةُ اللَّيْلِ
“The most excellent prayer after that which is obligatory is the (voluntary) late night prayer.” 
Ibn Rajab said: “Tahajjud time at night is the best time for the performance of sunnah prayer. At the time, a slave is closest to his Lord. It is also the time when the gates of the heavens are opened. This is also the time to present various wishes to Allah SWT.” 
In answering the above question, we start by explaining the duration of time of the beginning and ending of the time for isya’ as discussed by jurists.
The Time the Isyak Prayer Begins
According to the final opinion in madhhab Imam al-Syafie, isyak time begins when the red stripe in the horizon of the sky is no longer visible (twilight has ended). Which is when the time of maghrib ends. 
This opinion is based on several narrations from the Prophet PBUH. In the following, we state several narrations related to this issue.
In a hadith narrated by Abdullah Ibn Abbas R.Anhuma, the Messenger PBUH said:
وَصَلَّى بِيَ الْعِشَاءَ حِينَ غَابَ الشَّفَقُ
“He (Gabriel) prayed the night prayer with me when the twilight had ended,” 
In the same narration, the Prophet PBUH said:
وَصَلَّى بِيَ الْعِشَاءَ إِلَى ثُلُثِ اللَّيْلِوَصَلَّى بِيَ الْعِشَاءَ إِلَى ثُلُثِ اللَّيْلِ
“He (Gabriel) prayed the night prayer with me when about a third of the night had passed,” 
In a narration from A’isyah R.Anha, Rasullullah PBUH said:
صَلُّوهَا فِيمَا بَيْنَ أَنْ يَغِيبَ الشَّفَقُ إِلَى ثُلُثِ اللَّيْلِ
“Pray it (Isya’ prayer) between the time when the twilight disappears and when one-third of the night has passed.” 
According to the above hadiths, it is clear the Messenger PBUH said that isya’ prayer starts when the twilight ends.
As for postponing it for valid reasons such as teaching knowledge, then it is permissible.
The Time When Isya’ Ends
In this matter, scholars have three differing opinions, which are:
First: Isyak prayer ends at the end of the first 1/3 of the night.
Second: Isyak prayer ends in the middle of the night.
Thrid: Isyak prayer ends at sunrise. 
The final opinion in madhhab al-Syafie stated: The time for isyak ends when the sun rises. As for the ikhtiyar (best; chosen) time is for it to be performed until one-third of the night, in another opinion, up till the middle of the night. This follows the statement of the Prophet PBUH:
لَوْلاَ أَنْ أَشُقَّ عَلَى أُمَّتِي لأَمَرْتُهُمْ أَنْ يُؤَخِّرُوا الْعِشَاءَ إِلَى ثُلُثِ اللَّيْلِ أَوْ نِصْفِهِ
“Were it not for causing distress to my people, I would command them to postpone the night prayer till a third or a half of the night had passed.” 
The jawaz (permissible) time continues until before subuh. Some scholars say that it is makruh (discouraged) to postpone Isyak prayer after half of the night has passed to avoid khilaf. 
Delaying Isyak for Qiyamullail
In our opinion, it is permissible to postpone isya’ prayer due to classes or if the prayer is delayed because one expects the arrival of more congregants, then it is permissible in these situations.
Consequently, if there is no need for the prayer to be delayed when congregants have gathered in the mosque or surau at the beginning of the time of prayer, then this is prioritized based on the general statement of the Prophet PBUH to Abu Zar RA:
كَيْفَ أَنْتَ إِذَا بَقِيتَ فِي قَوْمٍ يُؤَخِّرُونَ الصَّلاَةَ عَنْ وَقْتِهَا قَالَ قَالَ مَا تَأْمُرُ قَالَ صَلِّ الصَّلاَةَ لِوَقْتِهَا
‘What will you do if you stay among people who delay the prayer until its time is over?’ He said: ‘What do you command me to do?’ He said: ‘Offer the prayer on time,” 
Likewise, according to a statement of the Prophet PBUH when he was answering the question by Abdullah bin Mas’ud RA:
أَيُّ الْعَمَلِ أَحَبُّ إِلَى اللَّهِ ؟ قَالَ : الصَّلاةُ عَلَى وَقْتِهَا
‘Which deed is loved most by Allah?” He replied, ‘To offer prayers at their early (very first) stated times.’ “ 
Lastly, in this matter, in our opinion, perform the isyak prayer in congregation. The reason is the act is also considered as qiyamullail and rewarded with qiyam throughout the night is he follows the imam until the end.