Now resting at home, on Wednesday the Girls star tweeted: "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."
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.— Lena Dunham (@lenadunham) March 10, 2016
Dunham revealed that she had left the hospital on Monday in an Instagram post.
"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"
Dunham announced last month that she would not be doing press before the new season of Girls premiered on Feb. 21 due to a severe flare-up of endometriosis.
"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," Dunham wrote in Facebook post Feb. 8.
"So many women with this disease literally don't have the option of time off and I won't take it for granted."
Dunham recently told Paper magazine that due to her condition, she might be unable to have kids on her own.
"I've always wanted to be a mother as long as I've been on this earth, it's something that has been important to me," Dunham said. "I've said to my boyfriend [Bleachers frontman Jack Antonoff], 'If fertility ends up being a challenge for me, I'm not gonna be the person who spends six years in IVF' because while I'm really intrigued by the possibility of carrying a child in my body, and I don't judge anyone else's choices, for me, years and years of hormones and body manipulation wouldn't work for my psychology and my body."
Instead, the writer and actress would be open to adoption.
"It's not important enough to me that my child come out of my body and it's not important to me, really at all, that the child belonged to Jack and me on a genetic level. It's important to me that we have the right child for us and take the right kind of care of them."