I would give a slight caution that inside jokes can translate very poorly into Japanese, because the cultures are so different and humor is so different.
Having said that: I would go with 自業自得, which literally is something like "my own actions, my own just deserts" or, to put it more colloquially,
"I ****** around and I found out". In the past the connotation wasn't always negative, and it could be used in a positive way ("honest work will lead to just rewards" kind of thing - almost Ben Franklin-ish). But nowadays it is always negative or ironic, and always means someone mucked around and got what they deserved.
Note there is no "I" in that sentence - it would be implied or understood from the context. There are other ways to say this, but they are all variations on this 4-character idiom.