When you come up from out of the water to get air so that you do not take damage, are you instantly able to stay underwater for the maximum amount of time before you start taking damage when you go back under water? Or do you have to stay above water for a certain amount of time?
No, it does not matter, the bar instantly refills. It also will completely refill when casting a waterbreathing spell under water or taking a potion having that same effect. So just come up to the surface until the bar disappears and you're good to go back down.