When standing, I'll only do it for 10-15 seconds, rarely more than 30s. I find it's best for super short steep pitches that you might need a little extra OOMPH to get over, of just to stretch the legs a little bit in a longer climb (in which case I'll shift one or two gears to give it more resistance just for that little bit).

The tips for how to get there are good above. I'd only add that I have to consciously think to keep my butt back a little bit, almost touching the nose of the saddle. Also, to help save my quads, I just use my legs to get my feet into position, straighten the knee, and then just use my bodyweight to push down on the pedal rather than muscles. Then focus to the other side and stand again. It takes some practice to get the timing right.

Good luck!

-- gnat!