If one was up all night and went to sleep after Alos Hashachar does one still say Hamapil?
2 Answers
The Mishna Brura (Beiur Halachah 239:1, s.v. samuch) questions whether one should say it if he thinks he will not fall asleep before Alos HaShachar, even if it is currently before Alos HaShachar, and says that it should definitely not be said after Alos HaShachar.
The Shaari Teshuva O.C. 239:1 s.v. 2 mentions opinions based on Kabbalistic reasons that one should not say the Bracha after halachic midnight, but rejects them. However, the Yalkut Yosef (as mentioned in another answer by Danny Schoemann) does agree with those opinions. The Kaf HaChaim (239:8) brings several supporting sources and their reasons on the side to not say it after halachic midnight.
In the קיצור ש''ע ילקוט יוסף it says in סימן רלט - דין קריאת שמע שעל המטה:
One only says Hamapil with its ending Bracha until midnight.
After midnight one need not say Hamapil, but it's a good idea to say it without the final Bracha.
One who goes to sleep towards morning and will only fall asleep after Amud Hashachar need not say Hamapil.
א: ברכת ''המפיל חבלי שינה מעיני'', הנאמרת עם הקריאת שמע שעל המטה, צריך לאומרה בשם ומלכות, אם הולך לישון קודם חצות לילה. יש להשתדל בכל עוז שלא להפסיק בדיבור בין הברכה לשינה, זולת בפסוקי קריאת שמע ושאר פסוקים שבסידורים (הנאמרים לאחר ברכת המפיל). ואם עבר ודיבר, אין ברכתו לבטלה, ואינו צריך לחזור ולברך כלל. ואם תאב לשתות אחר שבירך המפיל. רשאי לברך ברכת הנהנין בלא כל חשש, וכן יש להקל לדבר דיבור נחוץ. כגון להשתיק ילד, או לברך ברכת אשר יצר, אם הוצרך לנקביו, לאחר שבירך המפיל. ומנהגינו לברך ''המפיל'' קודם קריאת שמע. אולם ההולך לישון אחר חצות לילה אין צריך לברך ברכת המפיל, וטוב שיאמרנה דרך תפלה ותחנה בלי שם ומלכות, וכל שכן אם הולך לישון בסוף הלילה, ויירדם רק לאחר עמוד השחר, שלא יברך המפיל. [ילקוט יוסף דיני ברכות עמוד תרסד].
(I'm not sure what his sources are, and I couldn't find a hint of these Halachot in the Shulchan Aruch, Aruch Hashulchan or Kitzur Shulchan Aruch.)
-
1The list of sources for the halacha is long, but it can be found on R. Ovadia's teshuvah that this Yalkut Yosef is based on: יחוה דעת חלק ד סימן כא– AryehApr 17, 2015 at 11:09