Hermeneia has some interesting commentary on this. First, their translation:
When YHWH returned again to Zion,
we were like those who dream.
Hossfeld, F.-L., & Zenger, E. (2011). Psalms 3: A Commentary on Psalms 101–150. (K. Baltzer, Ed., L. M. Maloney, Trans.) (p. 369). Minneapolis, MN: Fortress Press.
In their commentary, they point out that some extra-biblical texts clarify the meaning of this passage:
The ancient versions apparently derive שׁיבת from שׁבה, “be in
prison,” and translate “turn back Zion’s imprisonment,” that is, put
an end to it. It is possible that the Masoretes already understood it
this way, as the change from the ketib שׁבות, “return,” to the qere
שׁבית, “war captivity,” in Ps 126:4* shows. The noun attested in Ps
126:1b in Codex Lenigradensis/Petropolitanus, שׁיבה, “restoration,
turning,” is indeed a biblical hapax legomenon, but it is now attested
also in an ancient Aramaic contractual text from Sfire (Stele III from
the Sfire steles, mid-eighth century B.C.E.), in combination with the
verb שׁוב in the Hifil, where the turning means “restore a previous
situation”: “The gods restored my paternal house/my dynasty” (cf. KAI
no. 224, 24–25).* Accordingly, there need not be a textual or scribal
error in Ps 126:1*, as was previously often supposed (thus, for
example, Kraus, 2:1031). It is true that Ps 126:1*, 4* does not have
the Hifil (causative stem), but the Qal (basic stem) of שׁוב, “turn
back,” so that the Sfire example cannot be adduced to explain Psalm
126 (nor the other biblical passages in which the expression appears).
We should assume, with Ina Willi-Plein (“Wiedererwägung,” 59, 62),
that the form attested in some manuscripts for v. 1b*, שְׁבוּת,
“return,” is the original reading and in addition, the verb in the
expression שׁבות שׁוב must be translated not “bring back” (Hifil), but
“come back, return” (Qal). The accusative את־שׁבות ציון, “return with
regard to Zion,” is then to be understood as an “internal object” and
as a status constructus phrase, with the genitive dependent on שׁבות
designating the entity benefited by YHWH’s return. Literally, Ps
126:1* should be translated: “At the returning/at the return of YHWH
in a coming back/in a return with regard to Zion we were.…” Thus, we
have here a figura etymologica (or a paronomastic object), which I
translate “return again” (both in v. 1b* and in v. 4a*). Likewise, in
most of the other biblical passages in which the expression appears,
the verb שׁוב in the Qal indicates “not a transitive ‘bringing back’
but an intransitive ‘coming back’ of the subject (always God!) to a
previous decision or condition” (Willi-Plein, “Wiedererwägung,” 62).
Hossfeld, F.-L., & Zenger, E. (2011). Psalms 3: A Commentary on Psalms 101–150. (K. Baltzer, Ed., L. M. Maloney, Trans.). Minneapolis, MN: Fortress Press.