The 75-year-old woman was asleep at her home in the South Lanarkshire town of East Kilbride when she woke up at around 3:30am to find a man in her bedroom.
The man then carried out the attack, which Police Scotland said left the pensioner “absolutely traumatised”.
The attacker then escaped from the local authority managed property in the town’s Plover Drive after his victim shouted for help.
A neighbour in the street witnessed the intruder running south towards the nearby Crosshouse Road in the Greenhills area of East Kilbride.
Police said the man appeared to be under the influence of alcohol or drugs and was in his thirties.
The force deployed extra patrols yesterday in the residential area, with door to door inquiries being carried out by officers.
The sheltered housing complex where the attack took place features around 30 one-bedroom cottage-style single storey units along with a handful of flats. At the time of the incident, a linked 24 hour community alarm service was in operation.
The officer in the charge of the investigation has appealed for information about the assault.
Detective Inspector Colin Campbell said: “This despicable individual has left an elderly woman absolutely traumatised and extensive enquiries are under way to trace him.
“Officers are currently examining CCTV footage and speaking to local residents but we urgently need the assistance of anyone who was in the area in the early hours of this morning. We are looking to speak to any people who may have noticed a man matching the description acting suspiciously around the time of the incident.
“We would also appeal to motorists with dashcams who were driving in the surrounding area in the early hours of this morning to come forward, as you may have unknowingly captured something which proves to be vital to our investigation.
The suspect is described as white, in his 30s, of slim build, with dark hair and he was wearing a grey coloured hooded top.
Anyone with information is asked to contact Cambuslang CID via 101 and quote incident number 0329 of Thursday 21st September 2017.
Alternatively, people can call Crimestoppers on 0800 555 111 where details can be given in confidence.