This is the 7654th most frequent Chinese word.
过夜
To spend the night.
Here, '过夜' indicates spending the night due to circumstances, in this case, staying at a friend's house.
他因为赶不上末班车,只好在朋友家过夜。
He couldn't catch the last train, so he had to stay overnight at his friend's house.
This usage of '过夜' expresses a personal sentiment about staying overnight at a location away from home.
我不喜欢在别人家过夜,总觉得不习惯。
I don't like staying overnight at someone else's house; it always feels uncomfortable.
In this sentence, '过夜' is used to describe staying overnight at a specific location.