Judge Gordon Matenga said 20cm of the woman's hair was cut off over most of her head.
Brown and Coster both pleaded guilty to injuring with intent to injure.
Brown also admitted unrelated charges of driving with excess breath alcohol, escaping lawful custody, resisting police and possessing a methamphetamine pipe.
Judge Matenga said that the woman lost consciousness during the attack, to which Brown interjected: "No, she fell asleep."
The judge said neither Brown nor Coster did anything to assist their victim and showed her no empathy.
"It was a nasty assault, which effectively became a two-on-one situation," he said.
"It's appropriate to acknowledge that it was in the context and background of alcohol. Alcohol is not an excuse but provides some explanation as to why it happened as it did," the judge said.
The woman awoke the next day to find her shoes removed and her shirt ripped. She left the house and was helped by a concerned member of the public.
Judge Matenga sentenced Brown, who has been in custody since May, to two years in prison with leave to apply for home detention.
On his other charges, he was sentenced to lesser concurrent prison sentences and disqualified from driving for a year and a day.
Coster was sentenced to 15 months of intensive supervision and six months of community detention with a nightly curfew from 8pm to 6am.