Straightening it by staking would be the best approach. . Any solution is may be temporary if the hydrangea is leaning because it is reaching toward the light. This can often be the case of it is planted against the house. The plant will lean out as it tries to grow branches out away from the house to grab more sunlight.