Video footage of the incident shows the man approaching a tree stump and kicking off his blue shorts and his navy t-shirt before embracing the tree.
Members of the public became concerned about the man’s behaviour soon after when he exposed himself and began rubbing his body against the stump.
The man, believed to be in his 40s, was arrested on suspicion of indecent exposure and has since been released on bail while enquiries are ongoing.
One witness said: “I was just walking in the park with one of my mates and we saw a man hugging a tree and thought it was interesting.”
They added: “We walked closer and as we did, we saw his trousers down and this is pure gold. That’s why I started recording and he just started taking off all his clothes and kissing the tree.
“After I stopped recording, the police turned up and started following the man around then arrested him.”
In a statement, a spokesperson for Wiltshire Police said: “A man in his 40s was arrested on suspicion of indecent exposure yesterday after officers were called to Queen Elizabeth Gardens shortly after 4.30pm following several reports from members of the public regarding a naked man.
“He was taken into custody and has been released on bail while enquiries are ongoing.”