An appeals court found Mikael Halvarsson could have been asleep during the attack, reports ABC 13.

Halvarsson was accused after the victim woke up as Halvarsson allegedly assaulted her on April 2, 2014. They had been sleeping in the same bed, but they each had their own blanket, according to the translated court documents, which also noted that she called the police the next morning, and they found Halvarsson still asleep in her bed when they arrived.

In the appeal, Halvarsson’s previous girlfriend testified that he had previously tried once to have sex with her when she was sleeping. When she stopped him, he then acted confused and asked what had happened.

His mother also confirmed that he had disturbed sleeping patterns before.