Mark Terence Osborne
A Sydney teacher is facing court over allegedly having sex with a 17-year-old student. Reuters

An Australian teacher who was having sex with a student to "make him happy" has thrown herself at the mercy of the New South Wales District court.

The 34-year-old teacher from Sydney Grammar School has admitted to having sex with a student, who was just 17 years old, at her home, in the classroom and even in a school cupboard. Although the relationship was consensual, the student has since described the teacher as a "f*****g monster".

According to the court, the pair met several times in 2016. The "relationship" began in 2015 when she started texting the student. The teacher was even warned by the school that she was on thin ice when it came to making sexual comments around the grounds.

"It seemed to undermine everything I thought was happening and I had gained a sense of meaning in my life from thinking - wrongly - that I was making him happy," the court heard. "He said he was lonely, that he trouble talking about things to other people. I myself was very lonely at the time and it probably filled a need in me to see that I was helping someone else who was sad and lonely."

The teacher has cited mental health issues and marital problems as the reason she became interested in the student.

The couple first kissed after sharing lunch and some drinks at the teacher's apartment at the start of 2016. But by April the same year, the student had severed contact. Despite being ignored, the teacher tried flooding his inbox with messages. But according to her, it was an attempt to portray her regret about the situation.

"I wish there was a way I could convert how sorry I am into something that could help," she told the court.

The trial continues in December.