It's not like this was a sudden, unexpected storm. They knew it was coming, and they knew it would be bad, and that the roads would be impassible, and they knew they would be required to be there regardless. In that case, prudence would dictate that they make arrangements beforehand to come in with a suitcase and sleep over in the hospital, or to make arrangements with somebody to take over their shift.
Actually hospitals can dictate it. When we have an approaching blizzard, the hospitals can “lock in” the staff, meaning they can decree that no staff goes home until the situation is over.
The nurses and staff either sleep in empty hospital beds, or the hospital puts them up in a hotel across the street. All nursing and essential staff is aware this is a possibility, and comes prepared when a storm is forecast.