If a product is discontinued and not available, I would prefer to not land on a page saying simply that. i.e. fine if it points me elsewhere where it is available.
If a product is temporarily out of stock, I would want to know roughly when I could expect it to be back in stock.
If the product is expected to be available soon, I think it still makes sense to index the page and take the user to the product page with “Product not available” message.
User should be given an option to be notified when the product is available again.
I agree with the others, that if a product is out of stock, I would want to know this, and want some indication of when I might expect it to be in stock. Otherwise, I would just assume you no longer sell it and I would look elsewhere to buy it.
When you say you are “hiding” these pages, what do you mean by that? Are search engines still able to access them? If pages keep disappearing and reappearing, I imagine webmaster tools will start showing a lot of crawling errors and 404s, because there will still be links to those pages from elsewhere.
If you cease to sell a product, remove the page, set up a 301 redirect and amend your sitemap.
If a product is temporarily out of stock, leave the page and the sitemap as they are, but update the product information as already suggested.