"And the LORD said to Moses, Go to the people and sanctify them today" (Exodus 19:10): this was the fourth day. "And tomorrow, and let them wash their garments" [that they immerse. One might think] that they should immerse on the fifth day; but if they immerse on the fifth day, they are still within the evening reckoning for the sixth. What does Scripture teach by "and sanctify them today"? That they immerse on the fourth day. And what were they doing on the fifth? Moses was writing down the words, like a man who writes them on scrolls. On the sixth, what does it say? "And Moses rose early in the morning and built an altar at the foot of the mountain, and twelve pillars for the twelve tribes of Israel" (compare Exodus 24:4). For whom were these pillars? Rabbi Yehudah says: for the twelve tribes of Israel. And the Sages say: for all Israel. And so it says, "And he sent young men of the children of Israel, and they offered burnt offerings" (ibid. 5)—he offered them on behalf of all Israel. From here they said: With three things Israel entered the covenant—with circumcision, immersion, and offering—and afterward the Torah was given to them. Circumcision, as it is written, "and no uncircumcised person shall eat of it" (Exodus 12:48); Moses our teacher circumcised them in Egypt so that they could eat the Passover. And so it says, "And I passed by you and saw you wallowing in your blood, and I said to you, In your blood live, and I said to you, In your blood live" (Ezekiel 16:6)—these two bloods are the blood of circumcision and the blood of the Passover. And offering, as it is written, "And he sent the young men of the children of Israel, and they offered burnt offerings" (Exodus 24:5). And immersion, as it is written, "and let them wash their garments." I know only that they were required to launder their garments; from where do I know that they were required to immerse? It is a logical inference: if at a time when they are not required to launder garments they are required to immerse, then at a time when they are required to launder garments, all the more so should they be required to immerse.
Wash Your Garments and Enter the Covenant by Three Rites
Mekhilta DeRabbi Shimon Ben Yochai 19:10
ויאמר ה' אל משה לך אל העם וקדשתם היום זה יום רביעי: ומחר וכבסו שמלותם. [שיטבלו יכול] שיטבלו ביום החמישי והלא אם יטבלו ביום החמישי הרי הן ערבי שמש לשישי מה ת"ל וקדשתם היום שיטבלו ביום הרביעי: ומה היו עושין בחמישי היה משה כותב את הדברים כאדם שכותבן בסמפונות: בששי מהוא אומר (ע' כ"ד ד') וישכם משה בבקר ויבן מזבח תחת ההר ושתים עשרה מצבה לשנים עשר שבטי ישראל: למי היו מצבות האלו ר' יהודה אומר לשנים עשר שבטי ישראל וחכמים אומרים לכל ישראל: וכן הוא אומר (שם ה') וישלח את נערי בני ישראל ויעלו עולות על ידי כל ישראל הקריבם: מיכאן אמרו בשלשה דברים נכנסו ישראל לברית במילה וטבילה וקרבן ואחר כך ניתנה להם תורה: מילה דכתיב (י"ב מ"ח) וכל ערל לא יאכל בו מל אותן משה רבינו במצרים כדי שיאכלו את הפסח וכן הוא אומר (יחזקאל ט"ז ו') ואעבר עליך ואראך מתבוססת בדמיך ואמר לך בדמיך [חיי] ואומר לך בדמיך חיי שני דמים הללו זה דם מילה ודם הפסח: וקרבן דכתיב (כ"ד ה') וישלח את נערי בני ישראל ויעלו עלת על ידי כל ישראל: וטבילה דכתיב וכבסו שמלותם אין לי שהן טעונין אלא כבוס בגדים מניין שהן טעונין טבילה דין הוא ומה אם בשעה שאין טעונין כבוס בגדים טעונין טבילה בשעה שטעונין כבוס בגדים דין הוא שיטענו טבילה: