"And Joshua rose early in the morning" (Joshua 3:1). In the morning, and not at night. This teaches that once permission has been given to the destroying angel, it does not distinguish between the righteous and the wicked. And so it says, "Come, my people, enter your chambers" (Isaiah 26:20), and it is written, "and none of you shall go out at the door of his house until the morning" (Exodus 12:22), and it says, "Behold, I am against you, and will draw forth My sword out of its sheath, and will cut off from you the righteous and the wicked" (Ezekiel 21:8). And it says, "And it shall be, when My glory passes by" (Exodus 33:22) -- to teach you that one should enter while it is still good light and go out while it is still good light. And so you find that the patriarchs and the prophets conducted themselves with proper conduct, as it is said, "And Abraham rose early in the morning" (Genesis 22:3), "And Jacob rose early in the morning" (Genesis 28:18), "And Moses rose early in the morning" (Exodus 34:4), "And Samuel rose early in the morning" (1 Samuel 15:12). And are these things not an argument from the lesser to the greater? If the patriarchs and prophets, who went to do the will of Him who spoke and the world came to be, conducted themselves with proper conduct, how much more so other people. And thus it says, "You make darkness, and it is night, wherein all the beasts of the forest creep forth; the young lions roar after their prey; the sun rises, they gather themselves away; man goes forth to his work" (Psalms 104:20-23), and it says, "How manifold are Your works" (Psalms 104:24).
Joshua Rose Early and the Way of the Righteous at Dawn
Yalkut Shimoni on Nach 13:1
וישכם יהושע בבקר (יהושע ג, א). בבקר ולא בלילה מגיד משנתנה רשות למלאך לחבל אין מבחין בין צדיק לרשע, וכן הוא אומר לך עמי בא בחדריך, וכתיב ואתם לא תצאו איש מפתח ביתו עד בקר ואומר הנני אליך והוצאתי חרבי מתערה והכרתי ממך צדיק ורשע, ואומר והיה בעבור כבודי ללמדך שתהא נכנס בכי טוב ויוצא בכי טוב. וכן את מוצא שהיו האבות והנביאים נוהגים בדרך ארץ שנאמר וישכם אברהם בבקר וישכם יעקב בבקר וישכם משה בבקר וישכם שמואל בבקר. והלא דברים ק"ו אם אבות ונביאים שהלכו לעשות רצונו של מי שאמר והיה העולם נהגו בדרך ארץ שאר בני אדם עאכ"ו, וכה"א תשת חשך ויהי לילה, הכפירים שואגים לטרף, תתן להם ילקוטון, תזרח השמש יאספון, מכאן ואילך יצא אדם לפעלו, ואומר מה רבו מעשיך וגו':