The man is fighting for life as police detain a woman over the alleged attack.

Woman charged after hammer attack at Sydney hospital

A patient has allegedly been attacked with a hammer in his hospital bed in Sydney’s inner west.

The 63-year-old man suffered critical head injuries in the alleged attack at Royal Prince Alfred Hospital (RPA) just after midnight on Thursday.

A 46-year-old woman known to the victim, is accused of sneaking into the man’s room and bashing him in the head with a hammer, 7NEWS reports.

The pair are believed to be known to each other, though not in a domestic relationship.

Authorities are reportedly probing a potential family dispute.

The woman was arrested shortly after the alleged attack, and taken to Newtown Police Station where she has since been charged with wound person with intent to cause grievous bodily harm.

She was refused bail to appear in court on Thursday.

An apprehended violence order has also been taken out for the victim’s protection, 7NEWS understands.

The man is now fighting for life in the intensive care unit at the RPA.