Matthew Perry is ''going home'' following his three month hospital stay.

The former 'Friends' star revealed on Friday (14.09.18) that he had been staying in hospital for a lengthy three months after undergoing an emergency operation to fix a gastrointestinal perforation, which causes severe abdominal pain and tenderness and can be fatal.

And now, sources say the star is ready to head back home, with one telling People magazine: ''He's good. Going home finally.''

Matthew, 49, had previously taken to Twitter to announce his lengthy stay at a hospital in Los Angeles, California.

He wrote: ''Three months in a hospital bed. Check.''

The news comes after his representative confirmed the need for surgery last month.

They said at the time: ''Matthew recently underwent surgery in a Los Angeles hospital to repair a gastrointestinal perforation. He is grateful for the concern and asks for continued privacy as he heals.''

A gastrointestinal perforation or ruptured bowel occurs when a hole develops in the lining of the gastrointestinal tract and can be caused by illnesses such as Crohn's disease, colitis and appendicitis.

Although it is usually repairable, doctors have to work fast to prevent the contents of the gastrointestinal tract from spilling out into the stomach and causing an infection.

Once an infection develops, it can lead to sepsis and ultimately cause death.

Details on Matthew's surgery are not known but he has been very open in the past about his struggles with alcohol abuse, which can contribute to digestive health issue.

The actor completed a 48-day programme in rehab for Vicodin addiction in 1997 after he turned to the drug to stop him from ''drinking as much'' as he was.

In 2001, he checked back into a rehab facility to recover from his use of Vicodin, methadone, amphetamines, and alcohol.

He said previously: ''I've had a lot of ups and downs in my life and a lot of wonderful accolades but the best thing about me is that if an alcoholic comes up to me and says, 'Will you help me stop drinking?' I will say, 'Yes. I know how to do that.' ''