One night would work, tons of people do it.
Several nights may not work, though some hotels won't care. Some hotels may care and deactivate your key to see if you are really staying or not.
You do have to show up though, even if it's just to walk out again, you can't not check in and expect credit for the stay.