A few years ago friends of ours were selling their house to move to a different state and it sold more quickly than they expected. They ended up having the choice of putting everything in storage and finding temporary housing for a couple of months or renting the house back from the new owners for two months. The new owners were first time purchasers so were not under a tight deadline to move in so the second option worked out for them. The rent-back was documented and paid for at the closing.
When we bought our place last fall it was already vacant except for the staging furniture. The week before the close our realtor had to keep hounding the seller's realtor to make sure that that stuff was out by close because he knew that we had movers scheduled four days after close. Apparently the staging company was crazy busy because of the market being so hot that they just didn't have staff to be able to come get it.