The last Mishnayot in Massekhet Pesahim return to the discussion of the korban Pesah itself, within the context of eating it at the seder. The Mishna on our daf teaches that if all of the people fell asleep, then their korban Pesah cannot be eaten – explained in the Yerushalmi as due to the fact that people need to be thinking about the sacrifice, something that they cannot have been doing if they were asleep. Furthermore, according to the Mishna, if the korban is not eaten by midnight it becomes notar – leftover – and cannot be eaten.
The Gemara identifies the position that the korban Pesah must be eaten by midnight with Rabbi Elazar ben Azarya, who understands the command to eat the sacrifice ba-layla ha-zeh (Shemot 12:8) to mean the same time that God traveled through Egypt for Makat Bekhorot, the last of the plagues, which took place at midnight ba-layla ha-zeh (see 12:12). Rabbi Akiva disagrees with this reading of the pasuk and argues that it can be eaten throughout the night, reasoning that ba-layla simply teaches us that it is a unique korban that can only be eaten at night and not on the following day.
The Jerusalem Talmud suggests that even Rabbi Akiva agrees that as a Rabbinic ordinance – in order to avoid the possibility of eating the korban past its time – the korban Pesah must be consumed by midnight. Based on this understanding of Rabbi Akiva, the Mishna that declares the Passover sacrifice to be notar after midnight can be Rabbi Akiva’s position, as well, just on a Rabbinic level.
The Shulhan Aruk (Orah Hayyim 477:1) recommends that we finish the last matza – the afikoman – at our seder before midnight as the matza today represents the korban Pesah that we can no longer bring. The Rema (ibid) goes so far as to suggest that Hallel should also be completed before midnight, since it accompanied the sacrifice during the times of the Temple.