A Melbourne man says he is lucky to be alive after a derailed tram came crashing through his house "about a metre" away from where he was sleeping.

Key points: Man was sleeping in front room when tram crashed into his house

Man was sleeping in front room when tram crashed into his house Driver who crashed into tram taken to hospital

Driver who crashed into tram taken to hospital Tram driver and two passengers uninjured

Commander Bob Lanigan from the Metropolitan Fire Brigade said the tram derailed after colliding head-on with a car on High Street at Kew, in Melbourne's inner east about 11:15pm.

Paul Wilson said he was in bed when the tram slammed into his house.

"I heard this almighty crash out the front and then the next thing I know there's another bang and another bang and then the tram came flying through about a metre or two from me," he said.

"I got knocked out of bed and then all the plaster started coming down. It was just crazy, just crazy.

"I'm starting to feel very lucky ... I think I've dodged a bullet there."

Emergency crews worked through the night to remove wreckage from the house.

Acting Sergeant Greg Moore said the car was on the wrong side of the road when it collided with the tram.

He said the female driver of the car suffered some injuries and was taken by ambulance to hospital.

The tram driver and two passengers were shaken up but uninjured, he added.

Yarra Trams spokesman Simon Murphy said the crash was an isolated incident.

"There is an investigation underway. At this stage we believe there was no issue with either the tracks or the tram," he said.

"Around 75 per cent of our network is shared with traffic and we do remind motorists to take care when travelling on or near tram tracks."

Emergency crews worked for hours to remove the tram from the property. ( Metropolitan Fire and Emergency Services Board )

Resident 'lucky to be alive'

Commander Lanigan said Mr Wilson was lucky to escape injury.

"He was awoken by some loud bangs and heard something coming through his front yard," he said.

"It actually impacted his bedroom but he's OK, just a bit shaken as you'd imagine."

The tram crashed head on with a car, police say. ( Metropolitan Fire and Emergency Services Board )

The car hit a brick wall across the road near the Boroondara General Cemetery.

Engineers shored up the damaged house so the tram could be moved.

Police are investigating the cause of the crash.