The pasuk that anchors the entire teaching is Tehillim 47:6, which reads: "God ascends with the teruah sound; the Lord, with the voice of the shofar" — two distinct divine names corresponding, the Midrash will argue, to two distinct divine postures.
Building on that pasuk, Vayikra Rabbah 29:3 presents the core teaching in the name of Rabbi Yehudah son of Rabbi Nachman: when the Holy One sits and ascends upon the throne of judgment, He ascends in the attribute of judgment — expressed by the name Elohim and the word teruah — but when Israel take their shofarot and sound them before Him, He rises from the throne of judgment and sits upon the throne of mercy, expressed by the name Hashem and the phrase "with the voice of the shofar," and He becomes filled with compassion for them, turning the attribute of judgment into the attribute of mercy; and when does this occur? In the seventh month.
The same tradition, attributed to Yehudah bar Nachman in the name of Reish Lakish, appears in Pesikta DeRav Kahana 23:3 with the same scriptural derivation and the same temporal anchor — the seventh month — confirming that this is a widely transmitted teaching of Chazal, while Vayikra Rabbah 29:6 adds a striking formulation: the Holy One likens Himself to the shofar itself, which takes in on one side and releases on the other, saying that just as the shofar receives and releases, so He rises from the throne of judgment and sits upon the throne of mercy, converting the attribute of judgment into the attribute of mercy.
Shem MiShmuel, Rosh Hashanah 19:14 offers a deeper reading of the mechanism: the teruah sound that initially stirs the inclination toward the fullest measure of strict judgment is itself the very cause of the transition to mercy, because the full probing of judgment reveals that Israel are truly deserving of compassion — so the shofar's voice does not produce two separate effects but one single act whose surface appearance is din and whose inner reality is rachamim.
Valle, Inyanei Elul veRosh Hashana p. 51 notes that the Holy One taught Israel how to escape the severity of judgment through the sounding of the shofar, which awakens divine mercy, as the verse declares: "Happy is the people who know the blast," and Valle, Inyanei Elul veRosh Hashana p. 54 adds that on the Day of Judgment Israel must sound the shofar to arouse the higher mercy, and their festival confidence rests on the assurance that through the shofar's sounding God will remove all accusations against them.
Tzitz Eliezer (21:15) rules directly on the point: when the Jewish people sound the shofar, the Holy One, blessed be He, arises from the throne of judgment and sits upon the throne of mercy — giving this midrashic teaching its operative, applied expression in later responsa literature, alongside Tzitz Eliezer (20:75), which likewise affirms that when the Holy One hears the sound of the shofar He rises from the Throne of Judgment and sits on the Throne of Mercy.