744. In normal circumstances, the prescribed time for Maghrib and Isha prayers is till midnight. But if forgetfulness, oversleeping or being in Hayz and similar unusual situations prevent one from performing the prayers till midnight, then for them the time will continue till Fajr sets in. In all the cases, Maghrib must be prayed before Isha, and if one contradicts their sequence purposely or knowingly, the Namaz will be void. However, if the time left over is just enough for Isha prayers to be offered within time, then Isha will precede Maghrib prayers.
748. If a person in normal circumstances does not offer Maghrib or Isha prayers till after midnight, he should, as an obligatory precaution, offer the prayers in question before the dawn prayers, without making a Niyyat of Ada (i.e. in time) or Qadha (i.e. after the lapse of time).