Exodus 20:24-26 You shall make an altar of earth to Me, and shall sacrifice on it your burnt offerings and your peace offerings, your sheep and your oxen. In all places where I record My name I will come to you, and I will bless you. (25) And if you will make Me an altar of stone, you shall not build it of cut stone. For if you lift up your tool upon it, you have defiled it. (26) And you shall not go up by steps to My altar, that your nakedness be not uncovered on it.
In a very real sense, God is our father and the earth our mother. The God of heaven took a bit of earth and breathed his spirit into it, creating life. This fact in combination with the astounding miracles of reproduction, of putting seeds in the ground so that they will sprout and produce more seeds, of a man and woman joining their bodies to create a new person, could easily lead people into fertility cults. If imitation is the sincerest flattery, how better can we worship the Creator than through an act of creation? The command to make an altar of earth in order to worship the God of heaven re-emphasizes our descent from these two. However, there are two more commands attached to this one that strongly imply God does not approve of sex as an act of worship.
In the first command, God says we are not to build the altar with cut stones. We might have ideas about how to make a more beautiful altar, but God has said he will prepare the stones. We get to select them and place them, but the materials and format are strictly up to him. God wants his worship his way, not ours. He has told us how he is to be worshiped, and, although we might have a great deal of leeway in some of the details, we are not free to improvise however we choose. Although he commanded us to reproduce, he did not command us to worship him through the reproductive act.
In the second command, God says the altar should be placed so as to avoid even accidental exposure of the priest’s nakedness. If there was any doubt as to whether nudity should or should not be a part of overt worship, that should quell it.
In other places, Torah is quite clear that temple prostitution is an abomination to God. He doesn’t seem to have left much room for debate on this issue among people who accept the Hebrew scriptures as divinely inspired.