Jacob was running away from his brother after being dishonest with him, and he felt lonely and hopeless, but Allah gave him a dream so that he would have a spiritual revival and begin to have a true relationship with Allah, to be faithful to His words and understand that Allah’s blessing and protection would be with him:
“Jacob left Beersheba and went toward Haran. And he came to a certain place and stayed there that night, because the sun had set. Taking one of the stones of the place, he put it under his head and lay down in that place to sleep. And he dreamed, and behold, there was a ladder set up on the earth, and the top of it reached to heaven. And behold, the angels of God were ascending and descending on it! And behold, the Lord stood above it and said (…) I am with you and will keep you wherever you go, and will bring you back to this land. For I will not leave you until I have done what I have promised you.” Then Jacob awoke from his sleep and said, “Surely the Lord is in this place, and I did not know it.” – Taurat, Genesis 28:10-16.
After that, Jacob worshiped God in that place and began to have a close and personal fellowship with Him.