A Sri Lankan national has been charged over the alleged indecent assault of a university student on a campus in Sydney's north-west.

Police say a 20-year-old Macquarie University student allegedly awoke to find a man assaulting her in her bedroom on Thursday morning.

The attack allegedly happened in the student housing accommodation in Marsfield.

A 21-year-old asylum seeker was arrested at Sydney's Central Station on Tuesday morning and has now been charged with indecent assault and aggravated break and enter.

He has been refused bail and will face court today.

The Department of Immigration has confirmed the man is in Australia on a bridging visa but says he was not among a group of asylum seekers who were staying at the university.

The company that provides the university's student accommodation has hinted that it is considering scrapping its agreement with the Red Cross to house asylum seekers there.

The provider, Campus Living Villages, says at the time of the incident, there were 55 Red Cross clients on bridging visas living there.

In a statement, the provider says it intends to discuss the future of the program with the Red Cross and that it expects the influx of students by March will mean there are no remaining places for Red Cross clients.

It says the security and safety of residents at the facility is paramount.