meaning of marital fidelity

Somerset Maugham’s comedy of marital fidelity, ‘The Constant Wife’.

I know fidelity means (loyalty) and marital means (related to marriage).
But I can’t understand the above sentence with this meaning.

Could you explain it please?

Marital fidelity means “loyalty in a marriage”. In your sentence, the comedy is probably about marriage and spouses trying not to sleep with people they are not married to.