A traveler arrives at midnight, and the host discovers that he has nothing to set before him. He therefore goes to a friend's house asking for bread. The request reflects a culture in which receiving a guest created a serious obligation to provide hospitality.
The sleeping friend's complaint also makes more sense when an ordinary home is imagined rather than a modern house with separate bedrooms.