A Janesville man accused of sexually assaulting an unconscious woman last year will spend 90 days in jail and two years on probation.

A felony charge of second-degree sexual assault was reduced to two counts of misdemeanor fourth-degree sexual assault in Rock County Court on Friday.

Matthew S. Martin, 31, of 242 Ba Wood Lane, pleaded no contest to those charges and to a charge of obstructing for denying the assault when police questioned him.

Assistant District Attorney Katharine Buker and defense attorney Josh Grube said they negotiated extensively before coming to an agreement to reduce the charges and recommend probation and jail.

The attorneys agreed the prosecution might have had difficulty proving the charge at trial because the victim was not awake when the assault happened.

The woman, Martin and other friends were out drinking on St. Patrick’s Day and continued to party at Martin’s apartment. Martin offered the woman his bed to sleep, and she fell asleep with her clothes on, according to the criminal complaint.

She awoke early in the morning to find evidence of sexual assault, and Martin’s DNA was found when a rape kit was analyzed, according to the complaint.

Another major consideration in the sentence recommendation was Martin’s lack of a prior criminal record, Buker said.

Grube said the events did not occur as presented in police reports, but he did not elaborate.

His client has led a pro-social life, as evidenced by family support and employment, and he is being treated for mental health problems, Grube said.

Martin’s father and brother recently died, Grube said.

Judge Barbara McCrory agreed with the recommendation and noted letters of support from employers who described Martin as a respectful, reliable, loyal worker. One letter described Martin as working through personal tragedies “with honesty and grace.”

As part of the plea agreement, Martin will not be placed on the sex-offender registry and will serve his jail time either with work-release privileges for his job and caring for his ailing mother or at home on a monitoring bracelet.

If Martin’s probation is revoked, he could be sentenced to up to nine months in jail on each of the sex assault charges.