It would be stupid to wake kids up at night to spring for a hotel room... Josef K likely meant to say "give your wife some cash and let her go sleep in a hotel room... you stay behind with the kids."
A basement is a better option. Josef K's solution wasn't stupid, just the following assumptions that surrounded his advice.