from evidence presented. while you can't really "prove" you haven't been having sex, both the husband and wife can testify, and usually a psychiatrist or other doctor will testify. usually, this is connected with a personal injury case. the husband's back was hurt. the doctor testifies that he can't lay down or do strenuous activity. the wife sues for loss of consortium. the jury can make a reasonable inference from the evidence that the wife did, in fact, suffer damages.
the husband and wife need to provide enough evidence so that the jury's inference is reasonable, not speculative. "the spouse seeking compensation for <span class="term" id="TMB">loss of consortium must show</span> that he or she suffered damages arising out of the other's injuries."
as someone else said, the burden of proof in a civil trial is "by preponderance of the evidence", not "beyond a reasonable doubt." this means "more likely than not", or in other words, you just need 51%. this is why OJ was acquitted of murder, but found liable for wrongful death in the civil trial ("sure, there's some doubt, but he probably did it").