The phrase "making their hearts glad" is an idiom that means to have a good time with someone else. Alternate translation: "they were have a good time together" or "they were enjoying themselves" (See: [[rc://en/ta/man/jit/figs-idiom]])
The phrase "know him" is a polite way of saying "have sexual relations with him." The men probably were not trying to be polite. (See: [[rc://en/ta/man/jit/figs-euphemism]])