You can't assume that the ball would have rolled down the hill, no matter how certain you might be. You were entitled to relief from the immovable obstruction (the sprinkler head).
The proper procedure was to determine the nearest point to where the ball lay which was not closer to the hole and gave complete relief from the obstruction for lie, stance and area of intended swing. From that reference point you get a one clublength arc not closer to the hole in which to drop the ball. If the ball, when dropped, rolls closer to the hole than the NPR, or rolls back in to a position of interference, or rolls more than 2 clublengths from where it first hit the gound, then it must be redropped. If it again rolls into one of those positions, then the ball must be placed on the spot where it first hit the ground when dropped the second time. The ball may be cleaned under this rule, but a ball may not be substituted for the original ball unless the original ball is not immediately recoverable.