Upvote:2
From what I understand of the laws is this:
Visas are not required for aliens in immediate transit on connected international flights who hold passenger tickets and stay for no more than 24 hours in China entirely within airport boundaries. Anyone desiring to leave the airport temporarily must obtain permission from the frontier inspection office. If you want to stay in a hotel near the airport (there are many hotels near the airport), you need the permission from the frontier inspection office.
Now do realize this is China, and enforcement of the laws can vary; however, I wouldn't try to book a hotel room, because you have to be registered with the police, so I would contact the airline and see what they can do for you.