The husband made a bet with his friend that his wife would sleep with him