Peter Marc Jacobson

When Fran Drescher and Peter Marc Jacobson divorced in 1999, it was because Jacobson realized he was gay. Now Drescher depends on her ex-husband for relationship advice, as she explained Wednesday on 'Access Hollywood Live' (weekdays, syndicated on NBC). She based her new sitcom, 'Happily Divorced,' on their relationship, and there are times when she really needs his help.

It took a while for Drescher and Jacobson to get comfortable enough to start talking about their new personal lives with each other. But once they did, they became closer than ever. "I was in a relationship for a while that was, you know, very volatile and complicated, and that kind of dimensionalized our relationship on a new level," she said. Drescher could hardly find someone who knows her better to ask for advice.

Drescher's gaydar still hasn't improved much, though. "She went to a bar and she liked this guy," said Jacobson, "and she was, like, flirting with him, and the girl said, you know, 'Stop, he's gay.' She said, 'Oh, okay, well, I have an ex-husband for you...'"

Fran Drescher is back! The star of 'The Nanny' is returning to her roots -- sitcoms -- after giving a tawk talk show a try. But this is no ordinary comedy. Drescher is teaming with ex-husband and 'Nanny' co-creator Peter Marc Jacobson to bring a fictionalized version of their life to audiences.

In the new TV Land sitcom 'Happily Divorced' (premieres Wed., June 15 at 10:30PM ET), Drescher and Jacobson play their real-life situation -- they had a seemingly perfect marriage until Jacobson came out as homosexual -- for laughs. The couple is divorced now, but just as happy as before.

Fran stars as a fictionalized version of herself, with 'Best In Show' star John Michael Higgins as Peter and 'West Side Story' veteran Rita Moreno as Drescher's mother.

At Monday's premiere party for 'Happily Divorced,' Drescher told AOL TV she wasn't hesitant in bringing her personal life to the screen.

"We were already writing a movie," Drescher said. "We always write about what we know anyway, and then it takes on its own life as a creation."

When Fran Drescher and Peter Marc Jacobson were still married, Jacobson had not yet come to the realization that he was gay. He went back and forth on the question with therapists until the couple divorced in 1999.

Drescher, who now hosts 'The Fran Drescher Tawk Show,' and Jacobson were on 'The Oprah Winfrey Show' (weekdays, syndicated) together on Friday, and seemed very comfortable with each other. Oprah asked, "Did you have a healthy sex relationship?" and they both responded positively. Jacobson went so far as to say it was "great sex."

"We always used to think that we must be having better sex than, you know, our friends," said Drescher, "because, I don't know, he's a very sexual man."