Katharine McPhee is opening up about the challenges of her pregnancy.

Earlier this week, it was revealed that the "American Idol" alum, 36, welcomed a baby boy with her husband, David Foster, 71. The pair had confirmed the pregnancy in December.

On Tuesday, McPhee appeared on an episode of "Dr. Berlin's Informed Pregnancy Podcast" to talk about her experience.

McPhee admitted that the "biggest challenge" of pregnancy "was really the body-issue stuff."

KATHARINE MCPHEE, DAVID FOSTER WELCOME FIRST CHILD TOGETHER

"It just suddenly came up in a way that hadn't been present in a long time," said McPhee, making note of her past struggles, per People magazine.

The star said she'd "felt really stable" in recent years after battling eating disorders in previous years, which included a battle with bulimia.

Katharine McPhee said that she feared a 'relapse' in her eating disorders during her pregnancy. (Photo by Tommaso Boddi/Getty Images)

"But feeling like there was a relapse after getting pregnant was really shocking and upsetting and concerning for me, because I was suddenly so obsessed with food, starting from this first trimester, and I had such a distortion of the way that I looked," McPhee explained.

She revealed that she asked Foster to take pictures of her every day during the pregnancy, but now she looks at them and thinks, "Oh my God, why was I so hard on myself?"

The "Smash" actress said she ended up talking with a psychiatrist she had worked with in the past and learned that "it's really common for women who have struggled with eating disorders in the past to have almost a relapse, in some sense, when they enter pregnancy."

KATHARINE MCPHEE COMPARES 'INSTAGRAM VS REALITY' WITH MATERNITY SHOOT PHOTOS

"And it made me feel so much better that I wasn't alone in that headspace ... by just meeting with him and him talking me through it," shared McPhee. "It wasn't like he gave me a bottle of pills and said, 'Here's your pills for anxiety.' That's not what he did when he met with me, but he was just talking through it and asking questions."

By the second trimester things "got a lot better" though the fixation on food remained.

"I think it was also because I was going back to film on the show on Netflix that I had started, [which] obviously paused during the [COVID-19] pandemic," she explained. "But yeah, that was probably and has been the hardest part of pregnancy for me, was just feeling like I was relaxing in some capacity with my food issues."

Katharine McPhee has welcomed a baby boy with her husband David Foster. (Photo by Frazer Harrison/Getty Images)

The singer recalled feeling "really ravenous" during her first trimester, which made her wonder, "Is this just the eating-disorder version of me or is this actually my body?"

"Suddenly, the cues felt really different, and I didn't know how to interpret them," she said. "When I did eat, I would feel really full and it was very confusing [and] made someone who felt like I had it figured out, the food issues, [feel like] suddenly I didn't have any of it figured out."

CLICK HERE TO GET THE FOX NEWS APP

She said she didn't feel that she completely "relapsed," but "it was definitely a feeling like I was overeating and then I had that stuffed feeling where I couldn't breathe and I couldn't figure out if [it was] because there was a new thing in my body that was making me feel stuffed or if I was actually eating too much food."

CLICK HERE TO SIGN UP FOR OUR ENTERTAINMENT NEWSLETTER

McPhee added: "And there's just a lot of anxiety. But I weathered it and I'm just really grateful I'm at the end of it [and] that I feel this good and that I look in the mirror and I'm like, 'Yeah, my legs, my thighs, my arms are a little bit thicker, but I'm okay with it.'"