The High Court in Edinburgh was told that Ekpe, a former biomedicine student at Heriot-Watt University, sexually assaulted his first victim in 2022 at a flat in Grangemouth.
The woman was asleep, intoxicated and incapable of consenting when he assaulted her.
The court was told he struck again later that year when he raped a sleeping woman in Edinburgh.
Ekpe was on four separate bail orders when he committed his final attack in Cumbernauld in 2023.
The court heard he repeatedly tried to kiss the woman, seized her body and touched her breast.
She was able to escape and ran through woods into the path of a car which stopped to help her.
Judge McFadyen made non-harassment orders prohibiting Ekpe from contacting or attempting to contact his victims, and also placed him on the sex offenders register indefinitely.
Following the sentencing, Det Insp Gordon Couper said: “Ekpe is a dangerous, violent man who subjected these women to horrendous ordeals and deserves to face justice for his actions.
“I would like to commend the women for their strength throughout the legal process, and I hope this conclusion will help them as they move forward with their lives.”