Another interpretation of (Genesis 28:11): "And he encountered the place" (va-yifga ba-makom) — <this teaches> that the Holy Spirit rested upon him, upon Jacob, and he prophesied that Israel was destined to sin, and that the Holy Spirit would depart from them. (And this is derived from "because the sun had set" (Genesis 28:11), for so we find in the prophecy of Micah, as it is written, "And the sun shall set" (Micah 3:6), which signifies retribution and the removal of prophecy.) As it is said, "And if they are prophets, and if the word of the LORD is with them, let them now entreat (yifge'u na) the LORD" (Jeremiah 27:18) — this teaches that this "encountering" (pegi'ah) is prophecy. "And he encountered the place, because the sun had set" — what is it that is written? "And the sun shall set upon the prophets, and the day shall be dark over them" (Micah 3:6).
Jacob Encounters the Place and Prophesies Israel's Coming Sin
Midrash Tanchuma Buber, Vayetzei 4:2
ד"א ויפגע במקום, ששרתה עליו רוח הקודש על יעקב, וניבא שעתידין ישראל לחטא, ורוח הקודש מסתלקת מהן, (וזה דורש מן כי בא השמש, שכן מצינו בנבואת מיכה שכתיב ובאה השמש (מיכה ג ו) שהיא פורענות וסילוק נבואה), שנאמר ואם נביאים הם ואם יש דבר ה' אתם יפגעו נא בה' (ירמיה כ זיח), מלמד שפגיעה זו נבואה. ויפגע במקם כי בא השמש, מהו שכתיב ובאה השמש על הנביאים וקדר עליהם היום (מיכה ג ו).