Credit: Michael Rozman/Warner Bros

Glee star Jane Lynch credits Ellen DeGeneres with helping her come out.

Earlier in her life, the 50-year-old Lynch (who wed psychologist Lara Embry this past Memorial Day) said she was mostly closeted.

"I used to lay in bed and go, 'How will I come out or will I come out?" she said on The Ellen DeGeneres Show Wednesday (check your local listings).

She said she made the decision not to hide her sexual orientation because of "people like" DeGeneres, 52, who announced she was gay on the cover of Time magazine in 1997, making her TV's first openly gay star.

"You were at the height of your fame and you came out," Lynch told her. "And that just blazed a trail for me. It really did. It made it so much easier for me what you did."

Lynch said it was easier for her to come out because she wasn't an A-list actress.

"It's because I'm a character actor, I think," she said. "If Julia Roberts we're gay, I think it would be harder. She's an ingénue."

DeGeneres then teased, "So you're saying Julia Roberts is gay?"

Lynch jokingly shot back, "That's what I'm saying. Right here on this show ... She won't admit it. I'm here to tell you she's gay. You're welcome, Julia!"