A spacecraft orbits a planet. It extends a mass about a horizontal direction on a long tether. At this point there is not much gravitational gradient between the craft and the ejected mass so there is not much tension in the tether. Later the gravitational gradient will tidally align this tethered two body system vertically now there is a tension in the tether due to the gradient.
To retract the ejected mass the spacecraft start pulling back the tether. Since there is a tension on the tether it will need to spend energy to do so. The question where this energy will go? Would it boost the orbit?