A sex predator who raped a sleeping woman has been jailed for five years.