A New Jersey elementary school gym teacher was charged with sexually assaulting a woman while she was sleeping, according to prosecutors.

Ryan Zamorsky, 29, was arrested last week after the woman told a family member about the alleged assault — and the relative called police, county prosecutors said in a statement.

Authorities would not release the age of the accuser, nor identify the location where she was allegedly assaulted — other than to say it was in Hillsborough.

Zamorsky lives in Hillsborough — and public records show that he is a $54,450-a-year teacher with the Somerset School District.

The district did not return calls for comment Tuesday, but NJ.com reported that he is a gym teacher at the Van Derveer Elementary School in Somerville.

A note to parents from district administrators did not identify Zamorsky by name, the news outlet reported, but confirmed that a teacher had been arrested.

“The alleged crime did not occur in Somerville and did not involve any Somerville students,” the letter said.

Zamorsky is being held at the Somerset County Jail.