Man found not guilty after blaming sleepwalking for sex attack