Oldish post, but are you still stuck? Assuming you are in the U.S., 5150's or any temporary involuntary hospitalization are 72 hours so I'm hoping you're free now.
But if not I'd strongly recommend against. The best advice is really to just obfuscate and lie about yourself until they release you, either from the deadline or following a checkup. If you make an attempt, that gives them cause to push for a 5250 which means you are going to be stuck for another 14 days.
Either way, hope you are free already and enjoying your own bed. Psych hospitals suck :(