(Exodus 12:29:) "And it came to pass at midnight, that the LORD (literally: and the LORD) smote all the firstborn in the land of Egypt." Rabbi Eleazar ben Padat said: Wherever it is stated "and the LORD," it means He and His council. The Holy One, blessed be He, sat over them in judgment, and the court on high decreed that the firstborn of Egypt should be smitten. Therefore (Scripture says): "And it came to pass at midnight," and so forth.
Why It Came to Pass at Midnight - The Heavenly Court Decrees Egypt's Firstborn
Midrash Tanchuma Buber, Bo 17:3
ויהי בחצי הלילה, ר' אלעזר בן פדת אמר כל מקום שנאמר וה' הוא וסנקליטין שלו, ישב עליהם הקב"ה בדין וגזרו בית דין של מעלה שינגפו בכורי מצרים, לכך ויהי בחצי הלילה וגו'.