In a sweet Instagram post, the 29-year-old, who recently revealed she was struggling with her endometriosis, thanked fans for all their support during her health issues.
Lena left hospital on Monday
"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," she wrote alongside a snap.
When the star was taken into hospital at the weekend, her spokesperson Cindi Berger said: "Lena Dunham has been very public with her personal bouts with endometriosis. 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.
Lena thanked fans for their support
"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 post on Instagram to her 2.3 million followers.
"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.
"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."