Senior Sergeant Craig Dinnissen, of Dunedin, said a 19-year-old female was woken up by a man who had entered her Harbour Terrace flat just past midnight on Saturday morning.
The man entered through the unlocked rear door and had gone up to her room.
He opened the bedroom door, apologised, then left stumbled downstairs.
The man broke a window upon exiting.
The circumstances suggested a case of mistaken entry, Snr Sgt Dinnissen said.
There were no suspects and enquiries were ongoing.
"Police again urge students to always lock their flats to prevent this type of incident happening.
"In this case the occupants were lucky not to have items stolen, or worse occur," Snr Sgt Dinnissen said.