There are many things one does to maintain monogamy.
Whether one masturbating would steer one to maintain a single relationship would be debatable. If ones sex
urge and desire is vanquished simply by a session of masturbation
to prevent an affair or other relations with another outside of a single relationship would be possible but not probable in my opinion.