The judge of the superior court of the county of a spouse's domicile may at any time, upon petition, exercise equitable powers in appointing, removing, or substituting trustees or in granting any order for the protection of the trust estate, exercising a wise discretion as to the terms on which the appointment shall be made or on which the order shall be granted.