in a marriage in which both spouses agree that it is acceptable to have sexual relationships with other people is termed open marriage and the resulting sexual relationships are generally not considered marital infidelity, at least from a non-legal standpoint.
The law in some areas may not recognize open-marriage agreements and thus such extramarital sex may be considered adultery nonetheless.
Sometimes only one party in an open marriage will opt to have other sexual relationships, in which case the one who does not do so is referred to as a wittol: sometimes called a "contented cuckold".