Wear a watch capable of monitoring your heart rate.

If accused of sexual assault the data will prove your innocence. Raping a person would spike the rapist’s heart rate.

Edit: Regarding situations where sex is consensual, and one is later charged with sexual assault, a HR during consensual sex would be lower than a HR during rape.