CONCORD, NH (CBS) — A New Hampshire homeless man is charged with burglary, indecent exposure, and sexual assault after sneaking into a random home, going into the bedroom of a sleeping 13-year-old girl and assaulting her, Concord Police said.

Twenty-eight-year-old Miles Anderson, of Concord, was taken into custody after the ordeal around 4 a.m. on Monday.

READ MORE: Mask Mandate In Massachusetts Schools Extended Into Jan. 2022

According to police, Anderson went into the house and “made his way into the bedroom of a sleeping juvenile victim, where he disrobed and assaulted the victim.”

READ MORE: Patrick Chung, Former Patriots Safety, Charged With Assaulting Woman

Miles Anderson in court on Tuesday (WBZ-TV)

The teen was able to get out of the bedroom and alert her parents. Her father restrained Anderson until police arrived.

MORE NEWS: Woman Hit, Killed By School Bus In Mattapan

The defense attorney believes that mental illness did play a role in Anderson’s actions. Anderson is being held on $100,000 bail and has been ordered to seek mental health treatment.