A boarding school housemaster "sexually touched" the feet of two sleeping pupils, Carlisle Crown Court has heard.
The Reverend Christopher Griffin, 57, is accused of six counts of sexual assault, alleged to have been committed at Sedbergh School in Cumbria in 2015 and 2016.
Mr Griffin, now of New Road, Ingleton, North Yorkshire, denies the charges.
Opening the case, the prosecution described it as an unusual one, due to the nature of the allegations.
Kim Whittlestone said: "The prosecution case is that while he believed they were asleep at night he would enter their rooms and he would touch, stroke and massage their feet and lower legs."
Both those he is alleged to have targeted were male and over the age of 16.
The first complainant told the court it would happen "at least once a week", and it made him feel "not safe and sort of helpless."
He said he would try to stop it by "wrapping myself in the blanket so my feet would not be free".
Giving evidence via videolink, the second witness said Mr Griffin squeezed and stroked his feet, and he could feel his breath on them.
He texted a friend: "Pretty freaked out. Griff just came into my room and held my feet."
Miss Whittlestone said the housemaster had been at the school for a considerable time and was said to be well liked by staff and pupils.
The trial continues.