Lena Dunham is resting and recovering after being rushed to hospital for surgery following a ruptured ovarian cyst.

The Girls creator and star said on Twitter she has even earned praise from her gynaecologist.

Lena announced she had left hospital on Instagram a few days ago, with this post:

She added the caption: “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.”

Last month Lena announced with this Instagram post that she would not be doing press ahead of the new season of Girls because of a severe flare-up of endometriosis.

She wrote:”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.”

She added: “So many women with this disease literally don’t have the option of time off and I won’t take it for granted.”