If you find yourself in a situation where you cannot pay for your hotel stay, the best course of action is to communicate with the hotel management. Explain your situation and work with them to come up with a solution. Many hotels are willing to work with guests to find a payment plan or alternative solution.