If he's your boss, you call HR and tell them. A boss having relations with one of his direct-report's wives is cause for termination. Sex is always a hot button in companies. Companies do not like to let a potentially-hostile situation fester like this since they might be held accountable in a lawsuit later. They're very risk adverse. Bosses get fired all the time for things like this. But you have to tell HR only. Don't tell your boss' boss or anyone else in the company and certainly don't put it off. Something like this would have to be done immediately. In this hypothetical (?) situation, it's better to do something than be a cuckold to the guy who already lords one position over you.
If you work for one of those "mom and pop" contractor companies with no HR department, then you should consult a lawyer of family law. Then ask him for a referral of a lawyer specializing in employee cases like this. Certainly do everything the latter lawyer tells you. Lawyers are like therapists in many ways. They will make you feel much better because they always know what to do.
P.S. - Any woman who cheats with their husband's boss is a c*nt. I think Moses said that.