The expression is a play on words. The idiom, "Turn the other cheek" comes from the Bible. However, the two parts of the buttocks are also called "cheeks". Hence a pun and not an idiom.
"But I say to you who hear, Love your enemies, do good to those who hate you, bless those who curse you, pray for those who abuse you. To one who strikes you on the cheek, offer the other also, and from one who takes away your cloak do not withhold your tunic either. Give to everyone who begs from you, and from one who takes away your goods do not demand them back. And as you wish that others would do to you, do so to them."
— Jesus Christ, English Standard Version (Luke 6:27-31)