If you watch vids of Lance Armstrong or true mountain climbers doin their climbin thing, they are almost always in the saddle, pedaling at an impressively high cadence, usually their hands on the tops of the bars, sometimes on the hoods, very rarely in the drops.

While you do get some stretch and power (for the short term) by getting out of the saddle, it is much more physically taxing. Learning to spin (ride at a relatively high cadence) in whatever gear you can manage going uphill will improve your climbing ability the most imo. I love getting out of the saddle, but if the hill is long, I stay seated as much as possible.