As long as they are kept in the tank water, they should survive for more than a day. Plus, the bacteria in the substrate would remain intact, so you wouldn't have problems.
Just make sure the water doesn't enter air pump or anything in case this happens. One way valves and keep the pump(s) above water's surface.