The witness, who wished to remain anonymous, told the Scottish Child Abuse Inquiry about his ordeal at New Park School in St Andrews in the 1970s, and how it still affects him.
"It will stay with me forever, until the day I die. There is no repairing it," he told the inquiry on Wednesday, under the pseudonym of "Andrew".
In evidence to Judge Lady Smith, he said that soon after he had moved to the senior school, aged around 10, he was pinned down at night in his dorm by a teacher, who covered his mouth and abused him.
Edinburgh crime news: Teenage boy arrested after riding motorbike in a 'dangerous manner in a public place'
Edinburgh fire: Blaze breaks out at Franco's fish and chip shop in Newington
Edinburgh fire: ‘I knew I had to just get out’: Residents evacuated as fire breaks out in Newington area of Edinburgh
Crime: Teenage thug who fathered a child during sentence is back behind bars
A 'deteriorating' footbridge over the Water of Leith has been closed
He told Andrew Brown QC, inquiry counsel, that he thought it was "unbelievable" that somebody would be "that brazen".
"I have no explanation for why no one said anything or did anything," the witness told the inquiry, which heard the school's dormitories had three bunk beds to sleep six boys.
"If I was speculating, possibly everyone else was absolutely terrified themselves and grateful it wasn't happening to them," he said.
He told the inquiry his abuser would pull him away to get him on his own, and was impossible to avoid.
In a written statement to the inquiry, read out by the QC, "Andrew" said he spent his time at the school thinking he would die.
"I genuinely spent my time fearing for my life. I lived this 24 hours a day.
"I knew I could wake up any night with a hand over my mouth holding me down. Every single night I went to bed terrified, with days and evenings being not much better."
He said he is terrified of physical and mental constraint to this day, adding that only recently has he been able to speak openly about the abuse he suffered.
The school read letters sent out by its pupils, and "Andrew" began to keep a diary which charted his abuse, but he said this disappeared after he left it out.
He said that some time later he was called to his headmaster's office and when he arrived the head was flanked by two police officers, and told "Andrew" that "we're here to look after you".
"I remember that like it was yesterday," he said. "It was the first time that anyone ever said anything like that. That was the first time I thought, 'gosh, this might stop'. That was a huge moment in my life."
He said that after the 30-minute meeting with the police, in which it was "simply not possible for them to have an understanding of what I had been through", he was sent back to class with a note explaining his absence.
He was soon pulled out of the school, and later found out the teacher responsible had been jailed for just six months.
He was sent to Fettes College in Edinburgh and "loved virtually every minute of it".
The private school, which counts one-time prime minister Tony Blair as one of its former pupils, was an environment where pupils either "sank or swam".
"Andrew" told the inquiry he agreed with the description that Fettes was "run by boys" with "teachers there to educate and referee".
But others reported a much more traumatic time.
In a written statement read out to Judge Lady Smith, "Thomas" said the school had a culture of "institutionalised cruelty". He said the "place was a shambles", and he was constantly hungry.
He said he was groped aggressively by an older pupil who tried to feel his genitals.
Another pupil, "Alistair", said he was not happy at the school, and there was a culture of violence and abuse which had a scarring impact on him.
The inquiry was told "Alistair" was forced to line up by older pupils who used a makeshift dart gun, and if younger pupils moved they would be hit with hockey sticks.
He said he suffered post-traumatic stress disorder as a result of his experience, adding that other boys were taken out of the school, and as he saw them leave, "I learned I was not loved and didn't deserve to be loved".
"Alistair" said "small boys became traumatised men", adding: "For some of us it was a violent and evil place which has had an impact on our lives."
The inquiry in Edinburgh continues.