You are correct. A combination of gravity and hydraulics pushes them down. Then they have to be retracted by ground crew for horizontal transport. Apparently it hasn't been too sucessful until recently.It looks to me like those are telescoping struts, and fly along for the whole rocket ride, retracted under the 'petals'. Maybe they deploy right at touchdown just prior to engine cut-off to keep that monster upright.
SpaceX hits new Falcon 9 reusability milestone, retracts all four landing legs
