A mentally-ill Mansfield man who raped a woman while she was asleep has been sentenced at Nottingham Crown Court.