In the tenth book of Homer's Odyssey, we find Odysseus on the island Aeaea, where he encounters Circe, "a goddess skilled in magic potions" (A.S. Kline translation). After some of his men are transformed into animals by Circe, Odysseus himself goes to investigate.
On the way, he meets the god Hermes, who gives him a plant to protect him against the goddess and her magic. Hermes also tells him that
...she’ll invite you to her bed, and don’t refuse the goddess’ favours, if you want her to free your men, and care for you too. (A.S. Kline translation).
These words from Hermes, it seems to me, give Odysseus ample excuse to have sexual relations with Circe. One of the gods has told him that if he wants to save his men and save himself, then he must not refuse the goddess.
Of course, modern readers of Homer's epic get mad at Odysseus for sleeping with Calypso and Circe, while his wife Penelope has remained faithful for two decades. We should not forget, though, that Calypso and Circe are both goddesses and surely they could have killed Odysseus if they wished. Odysseus does what he has to do to save himself and his crew; and in his encounter with Circe he has a divine command to become intimate with the goddess.