If you're talking about Thicket Excavations, there's an elevator that works even if the quarry is flooded. Simply find that, get in, and hit the button to go up. If you called the elevator at the top, you'll have to wait for it to come back down, but that's not actually a problem. You could also walk all the way back up, but the route is very long, and you only have a limited amount of air, even in Power Armor, so you're more likely to die if you do that. The elevator is your only real option.
As a general rule, though, you'll want to quicksave before jumping into any body of water when using Power Armor, in case there's no way out.