The Baal Shem Tov, the 18th century founder of Hasidic Judaism, notes in his ethical testament, Tzavaat HaRivash, that the swaying in prayer is similar and connected to the act of copulation. He writes, "prayer is zivug (coupling) with the Shechinah. Just as there is motion at the beginning of coupling, so, too, one must move (sway) at the beginning of prayer.
https://en.wikipedia.org/wiki/Shuckling
https://imgflip.com/gif-maker/535380760/Jews-Hump-Wall