Beneficial bacteria will stay alive for weeks if kept wet and oxygenated. A few days if just kept wet. A few hours if allowed to dry out.
Chlorine kills off bacteria though. So if you allowed your filter to sit in chlorinated water its likely to have killed off any bacteria.