Play video content EXCLUSIVE TMZSports.com

Jason "Mayhem" Miller's domestic violence case just took a weird turn -- his lawyer brought up his penchant for "golden showers" and freaky sex acts in open court.

The MMA star and ex-MTV host is accused of beating up and stalking an ex-girlfriend in 2013 ... and he appeared in court Thursday in Orange County, CA for day 1 of his trial.

During the proceeding, Miller's lawyer explained that his client and the accuser had a pretty twisted sex life complete with threesomes, sex parties, choking and golden showers (peeing on each other).

Unclear how Miller's lawyer plans on using this information in the case ... but damn.