Lena Dunham released from hospital after undergoing surgery for ruptured ovarian cyst

Lena Dunham announced on Monday that she had left the hospital after suffering a ruptured ovarian cyst. The Girls star, who recently revealed she was struggling with her endometriosis, underwent surgery and is now recovering at home.

Posting a "good vibes" photo, the 29-year-old wrote, "Thank you so much for the love. 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."

A photo posted by Lena Dunham (@lenadunham) on

A spokesperson for the actress said over the weekend that she would have surgery. "Lena Dunham has been very public with her personal bouts with endometriosis," the TV star's spokesperson Cindi Berger said in a statement. "Lena will be undergoing surgery at an undisclosed hospital. We thank you for your understanding and hope that Lena's privacy will be respected."

The writer and producer recently spoke candidly about her condition, confessing that she was taking a break from work – including the press tour for the upcoming season of Girls – after doctors ordered her to rest.

"Hey Beloved Pals, I just wanted to let you know that, while I am so excited for Girls to return on Feb 21, I won't be out and about doing press for the new season," she wrote in a Facebook post. "As many of you know I have endometriosis, a chronic condition that affects approximately 1 in 10 women's reproductive health. 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."

A photo posted by Lena Dunham (@lenadunham) on

Lena thanked fans for their support after she shared her struggle with endometriosis

The actress added, "That's a hard thing to do, but I'm trying, because all I want is to make season 6 of Girls the best one yet."

Lena also went on to explain that she felt grateful for being able to take time off, with the full support of both the cast and crew of the popular TV show. "I'm lucky enough to have support and backup from Jenni, Judd and the whole Girlsgang," she continued. "So many women with this disease literally don't have the option of time off and I won't take it for granted. Wishing you all health & happiness, in whatever form suits you. Back soon xx Lena."

A week later, the HBO star took again to social media, to thank her fans for their supportive messages. "Thank you all so much for the support over the last few weeks," she wrote. "I cannot even begin to express how much good your generosity has done for my body/soul. I've met so many amazing sisters (and bros!) in arms through what some might label my "over-sharing" and it has healed me in a multitude of ways."

More about