Before righting you should have opened all sheets, downhaul traveller and rotator. If you hang at the bow or front beam the boat should not bear away and gain speed, maybe it goes backward. If so you can let drift your legs to the bows, lay one feet on the bridle wire. Then you can easily lift the other leg and one arm on the hull. Then you are up.
Going to the rear beam sounds dangerous if there are waves. The boat could easily bear away. In the best case it just flips over, in the worst you can say goodbay to the boat.