Berakot 1:1

M. Berakot 1:1 From what time may they recite the Shema in the evening?

From the hour that the priests enter [their homes] to eat their heave offering, “until the end of the first watch”— the words of R. Eliezer. But sages say, “Until  Midnight.” Rabban Gamaliel says, “Until the rise of dawn.” M‘H Š: His [Gamaliel’s] sons returned from a banquet hall [after midnight]. They said to him, “We did not [yet] recite the Shema.  He said to them, “If the dawn has not yet risen, you are obligated to recite [the Shema]. “And [this applies] not only [in] this [case].  Rather, [as regards] all [commandments] which sages said [may be performed] ‘Until midnight,” the obligation [to perform them persists] until the rise of dawn.” [For example,] the offering of the fats and entrails—their obligation [persists] until the rise of dawn [see Lev. 1:9, 3:3–5]. And all [sacrifices] which must be eaten within one day, the obligation [to eat them persists] until the rise of dawn. If so why did sages say [that these actions may be performed only] until midnight? In order to protect man from sin.