Louis Richardson of Jersey is alleged to have groped her at a house party while she was unwell in bed.
Durham Crown Court was told the woman's boyfriend challenged Mr Richardson, 21, via a Facebook message.
Mr Richardson has pleaded not guilty to sexual assault. He also denies the rape and sexual assault of another woman.
The court heard that in response to the message, in which Mr Richardson was accused of being "totally out of order", he wrote: "I always endeavour to accept responsibility for any of my actions, though my recollections of the evening are hazy at best.
"Please send on any such apologies in advance of me doing so in person."
The woman's boyfriend said: "She said she was asleep and had started to wake up to find Louis had put his hand on her breast."
The court also heard details of a rape charge. It was said to have happened after Mr Richardson, of Midvale Road, St Helier, met a woman at a nightclub.
The woman - who described herself as having been "crazy drunk" - went to Mr Richardson's home. The next thing she could remember was waking in the morning naked, with the accused calling her "rubbish in bed" as she had been unresponsive, jurors heard.
Mr Richardson, the former secretary of Durham University's Union Society, denied making the comment.
In total, he faces one charge of rape and three counts of sexual assault.
The case was adjourned until Friday.
A man used Facebook to ask the boyfriend of a woman he is accused of sexually assaulting to pass on his apologies to her, a court heard.