"And he took from the stones of the place" (Genesis 28:11). He thought in his heart: My grandfather Abraham, from two women, sired a righteous one and a wicked one — Isaac righteous and Ishmael wicked. And Isaac my father, from one woman, sired a righteous one and a wicked one. As for me, who am to take four women, how many wicked ones will come from me? The Holy One, blessed be He, said to him: Heaven forbid! "You are wholly beautiful, my love, and there is no blemish in you" (Song of Songs 4:7). When he rose early in the morning, he found all the stones to be one stone. He received the good tidings that his couch was whole, as it is said, "And Jacob rose early in the morning, etc." (Genesis 28:18). The Holy One, blessed be He, said to him: By your life, just as these stones became all one, so shall your sons all be righteous, as it is said, "For with the stones of the field is your covenant, and the beasts of the field shall be at peace with you" (Job 5:23).
Jacob's Stones Become One and His Sons All Righteous
Midrash Tanchuma Buber, Vayetzei 4:3
ויקח מאבני המקום. חשב בלבו זקני אברהם משתי נשים הוליד צדיק ורשע, יצחק צדיק וישמעאל רשע, ויצחק אבא מאש אחת הוליד צדיק ורשע, אני שאטול ארבע נשים, כמה רשעים יהיו ממני, א"ל הקב"ה ח"ו כולך יפה רעיתי ומום אין בך (שה"ש ד ז), כיון שהשכים בבקר מצא את האבנים כולם אבן אחת, נתבשר שמטתו שלימה, שנאמר וישכם יעקב בבקר וגו' (בראשית כח יח), א"ל הקב"ה חייך כשם שהאבנים הללו נעשו כולן אחת, כך בניך כולם צדיקים, שנאמר כי עם אבני השדה בריתך וחית השדה השלמה לך (איוב ה כג).