Jacob was on his way to find a wife from his maternal family. The previous verse tells that he took a stone and laid his head on it!! No modern day hotels for him! He obviously slept in spite of his uncomfortable pillow because he had an amazing dream.
Inspiration from Anne Elmer