If you sanitize a bunch of bottles and store them upside down on a tree or in a box (still upside down); how long can you store them like that before you feel the need to resanitize them?
Is there a better way to store them to keep them sanitary?
The general rule of thumb is that you want to use anything you sanitize within 30 minutes of sanitizing it. That is, sanitize and use, don't sanitize and then store.
In my opinion, then answers here are overly cautious. Not to say that they are "wrong" but beer is very forgiving.
I've personally sanitized a batch of bottles, left them to dry on the bottling tree, then returned to do the actual bottling the next day without any problems whatsoever. Here's why i belive this approach works:
(1) The plastic arms of the bottling tree are fairly unfriendly to bacteria due to their non-porous nature. Especially because they get hit with a small dose of sanitizer as the bottles drain out onto them. Just make sure they are cleaned of any gunk before bottling.
(2) The beer bottles are very inhospitable to bacteria after you've sanitized them. Bacteria cannot really live on glass without something else to cling to, so as long as your bottles were cleaned, then sanitized (not just one or the other), then the bacteria will find it very, very hard to live inside that bottle.
(3) So long as the bottles are upside down, no wild bacteria riding in on dust can get into them. The bacteria cannot really "climb" up the bottling tree, assuming its been cleaned of any organic material in between uses.
(4) Whatever random spec of bacteria that just happens to survive this inhospitable environment gets immediately dosed in a weak acid solution that has preservative herbs (hops) and a fair abount of alcohol. I'm talking about your beer of course! Remember, beer is not an easy environment for most bacteria to live in, this is why mankind kept on making beer to begin with.
So to summarize, make sure your bottling tree and your bottles are cleaned & sanitized, and make sure the bottles are stored upside down, which is their normal position on a bottling tree. If you do that, then you certainly have several hours, if not several days, to get around to bottling. Sounds like it could be a cool experiment too!
I wouldn't trust bottles stored for more than a few hours. While bottles are being kept in the box, air can circulate inside them, bringing any sort of unwanted predators. What I always do is sanitise the bottles and, as soon as they are dry, bottle the beer. I may be over-cautious but I can't see any that you can keep germs out of the bottles for longer times.
If you sanitized them and then covered the tops with foil/plastic wrap, I would feel pretty safe using them again. However, I always sanitize everything right before use - always! I use StarSan, and it takes literally seconds to spray or dunk my gear and have it sanitized and ready to go.
I realize the question wasn't "how do you do it" and more "what is the rule", but, not being a microbiologist, I'll stick with how I do it.
I use sani in a bucket with a spigot. I fill about 6 bottles to the brim, and by the time the 6th is full, the first has had its 30 seconds of contact time. I dump it out, dip the neck in the sani, and set it next to the bottling bucket. After all 6 are there, I fill them all. If any of them look dry, I'll dip them again just to be safe.
Don't fear the foam!
So, I guess in answer to your question, less than 5 minutes in my setup.
In "How to Brew", John Palmer claims that if you wrap a bottle top with aluminum foil and then sanitize it in the oven, the bottle will remain sanitized indefinitely (as long as the top stays wrapped in foil).