Barbara Eden has opened up about losing her beloved son 20 years ago.

Matthew Ansara, the only child of the actress and fellow performer Michael Ansara, passed away in 2001 at age 35. The cause of death was an accidental drug overdose.

"When Matthew was clean and sober, he was such a beautiful human being, inside and out," the "I Dream of Jeannie" star shared in this week’s issue of People magazine.

"Drugs are inexplicable," she said. "It’s so frustrating."

According to the outlet, Eden and her first husband tried for nearly seven years to conceive a child.

'I DREAM OF JEANNIE' STAR BARBARA EDEN REFLECTS ON HER 30-YEAR MARRIAGE: 'YOU HAVE TO LIKE EACH OTHER A LOT'

Barbara Eden

Pictured: Barbara Eden with son Matthew Michael Ansara. (Photo by NBCU Photo Bank/NBCUniversal via Getty Images via Getty Images)

"The same day that ‘I Dream of Jeannie’ sold, the doctor told me I was pregnant," said Eden "I was thrilled. I was so happy, but I knew they’d have to replace me."

But in the eyes of the show’s creator Sidney Sheldon, no one could replace Eden in the sitcom. "I Dream of Jeannie" premiered in 1965 and Eden filmed the first 13 episodes while pregnant with Ansara. The series, which told the comical tale of a U.S. astronaut [Larry Hagman] who stumbles upon a bottle containing a genie [Eden], aired until 1970.

"I don’t know if becoming a mom changed me, but it was the most wonderful thing that ever happened to me," Eden told the outlet. "It’s a miracle having a baby, and having this little creation. I get goosebumps when I think about it. It’s the loveliest thing that happened in my life."

But life wasn’t smooth sailing for Ansara. The outlet revealed that for 14 years, the actor and fitness trainer was in and out of rehab as he fought his addiction.

CLICK HERE TO SIGN UP FOR THE ENTERTAINMENT NEWSLETTER

Barbara Eden Matthew Ansara

Actress Barbara Eden and son Matthew Ansara attend ‘The Hollywood Walk of Fame Ceremony Honoring Barbara Eden with a Star’ on November 17, 1988 at 7003 Hollywood Boulevard in Hollywood, California. (Photo by Ron Galella, Ltd/Ron Galella Collection via Getty Images)

"At first, we didn’t recognize the behavior – the sleeping and bouts of anger that would come up all of a sudden with this charming, darling boy," Eden admitted. "I was scared to death. I didn’t know what to do. He was too young to know he needed rehab or help. It’s a wonder that he lived to be 35."

Ansara passed away on June 25, 2001. At the time of his death, it was reported that he was planning to marry on September 1 of that year and Eden was busy planning the wedding.

"I don’t think there’s anything worse than to lose your child," Eden reflected. "As a parent, I had a lot of guilt and anger, and following his death, I was always on the edge of tears. Even though he was 35, he was still my baby."

"I began to speak with parents who were going through the same thing," she continued. "I think parents should know that it’s not a bad thing to be strict with your child. If you know what’s going on, you have a chance to help. Ultimately it’s up to them, but there’s hope."

CLICK HERE TO GET THE FOX NEWS APP

Barbara Eden happy marriage

Actress Barbara Eden and Jon Eicholtz attend the Hollywood Chamber of Commerce event honoring Actress Barbara Eden with the Lifetime Achievement Award at Hollywood Roosevelt Hotel on April 26, 2012 in Hollywood, California.  (Photo by Araya Doheny/WireImage/Getty Images)

While the pain of losing her child will never fade away, Eden has found happiness in other ways. She has been happily married to real estate developer Jon Eicholtz, 83, for 30 years. Eden also said she has a supportive group of "dear friends" who are always by her side.

These days, Eden is gearing up for a show she’ll be doing with The Edward Twins in 2022.

"I guess I enjoy my work," Eden told Fox News in August. "I truly enjoy what I do and I love it… for me, it’s business as usual, to do what I love."

The Associated Press contributed to this report.