Lena Dunham is recovering at home after being dramatically rushed to hospital at the weekend for emergency surgery on what turned out to be a ruptured ovarian cyst.

On Wednesday night (March 9th), the ‘Girls’ writer and star wrote on Twitter: “My gynecologist says I'm a ‘good girl’ so I have achieved all I ever dreamed of. Loving you all from bed, even the rude bois out there.”

Dunham revealed in an Instagram post on Monday that she had left hospital, updating her fans on how she was doing, having been hospitalised on March 5th.

Lena DunhamLena Dunham was hospitalised on Saturday (Mar 5) and required surgery on a ruptured ovarian cyst

“Thank you so much for the love,” she captioned her photo. “I'm safely out of the hospital and recuperating. Your well wishes mean the world. I can't wait to be up and active, and to show my thanks… always your girl, Lena.”

More: Lena Dunham hits back at airbrushed cover shoot in Spanish magazine

Dunham, 29, told the press back in February that, due to a recurrence of endometriosis, she wouldn’t be participating in media duties to promote season five of ‘Girls’.

“I am currently going through a rough patch with the illness and my body (along with my amazing doctors) let me know, in no uncertain terms, that it's time to rest,” she wrote in a Facebook post. “So many women with this disease literally don't have the option of time off and I won't take it for granted.”

The HBO comedy drama, which began broadcasting back in 2012, was renewed last year for a fifth and sixth season, after which the series will end in 2017.

Speaking at the Sundance Film Festival back in January, the show’s creator Dunham spoke about the decision to end things there. “We were always conscious, especially because the show has been at times such a lightning rod, of overstaying our welcome… we wanted to make sure we kept the momentum alive and didn't allow it to soften over time.”

More: Lena Dunham goes out to campaign for Hillary Clinton