Jessica Alba 'started crying' when her daughter, 9, walked in on her and Cash Warren having sex. Here's what parents should know.

Jessica Alba and Cash Warren are recovering from a parenting blooper in which their tween daughter caught them in a compromising position.

The couple opened up during a recent episode of Alba's YouTube series "Getting Honest" with guest stars Rachel Zoe and husband Rodger Berman, a clip of which was obtained by People. On finding time for sex as parents (Alba and Warren share daughters Honor, 12, Haven, 9, and son Hayes, 3), the Honest co-founder revealed that Haven had accidentally walked in on them for the first time. "It was the worst," said Warren. "We spent five minutes in our bedroom laughing," with Alba admitting, "I started crying."

"I can't believe we just ruined our daughter," said Warren adding that he called his sister for advice (who Haven had already texted), then went to talk to his daughter. "We just have to own this one. We can't pretend it didn't happen," he said. "I went downstairs and I said, 'Haven, I bet that's the last time you walk into our room without knocking,'" he said. "And now she knocks. It was like she learned her lesson."

"Glad you guys haven't scarred your kids for life," joked Alba.

The couple is certainly not unique in their experience — in April, former Saved by the Bell star Mario Lopez shared that his 10-year-old daughter Gia Franchesca interrupted him and wife Courtney Mazza during "a little getaway" in their guest bedroom. The scene, which Lopez described on Lisa Vanderpump's Overserved series, was "traumatic" adding, "I was like lightning with the covers." Lopez went to speak with his daughter although "we couldn't find her for like an hour."

Dax Shepard and Kristen Bell pictured together in 2019. Photo: Christopher Polk/NBCU Photo Bank/NBCUniversal via Getty Images)
Dax Shepard and Kristen Bell pictured together in 2019. (Photo: Christopher Polk/NBCU Photo Bank/NBCUniversal via Getty Images)

Kristen Bell and Dax Shepard were also busted by their daughters, the actress told The Talk in 2017. "We sort of just went like, 'Hey, what's up? What do you need? What do you need?'" said Bell, who told her children that mom and dad needed to "nap." And in 2019, Kelly Ripa and Mark Consuelos shared that daughter Lola, then 18, walked in on them having sex on the teen's birthday. “She shuts the door and you hear, ‘You just ruined my birthday and my life and I used to see in color and now everything is gray,'" Ripa said, sharing that Lola called her parents "disgusting."

According to Dawn Brown, a psychiatrist in Houston, Tex., getting caught in the act can be upsetting for both parents and children. "Not only do children see their parents in a specific context, they understand affection in a certain way — parental snuggles, hugs and kisses," she tells Yahoo Life. "Now they're seeing a different expression of love."

How children interpret what they've witnessed also depends on their age and their understanding of sex. "For example, a 3-year-old child might be frightened, a 6-year-old might be curious, while an older child might think it's weird," says Brown. "Still, many parents in this situation often react as though their older children are still in those younger developmental years."

While undeniably embarrassing — "It's my worst nightmare," admitted Zoe — parents should explain that sex isn't a bad thing, rather an expression of affection between people who care for each other.

Brown recommends that both parents talk to their children — and right away. "You might say, '[We] are surprised that you came in without knocking. We are safe and love each other and this is how we show it in private,'" she says, noting that children whose parents regularly model a loving relationship may recover better from what they observed. Then ask kids if they have any questions.

A child's reaction often depends on their age and knowledge of sex and anatomy. And if those conversations haven't happened yet, it's a good time to talk, although parents can determine the immediate degree of detail. "The best time to explain sex is when children express curiosity about it either indirectly or with pointed questions or become more aware of their body parts," she says. And those conversations could widen to include topics such as appropriate touching or when people should be naked.

At least, says Brown, the memory will nudge parents to start locking their bedroom door.

Read more from Yahoo Life:

Want lifestyle and wellness news delivered to your inbox? Sign up here for Yahoo Life’s newsletter.