Olivia Wilde and Jason Sudeikis are facing a lawsuit from their former nanny who alleged that she was wrongfully terminated while on medical leave in 2021.

Court documents obtained by E! News said the pair's former nanny Ericka Genaro, who was hired as a live-in nanny and primary caretaker of the former couple's two children in 2018, took an increased parenting role to Otis, now 8, and Daisy, 6, after Wilde abruptly left the family home in November 2020.

The pressure of "not only being the primary caretaker of the children but also filling in Wilde's absence for the children became debilitating" for Genaro, her lawyers said in the documents.

In the lawsuit, filed at the Los Angeles County Superior Court on Tuesday, Genaro said Sudeikis began depending on her for emotional support after Wilde bolted the house. He would "seemingly require" her to "stay up at night after the kids were put to bed" for personal conversations which "naturally evolved to speaking about Wilde," USA Today reported.

When news of the couple's split came out in November 2020, Genaro's "anxiety and stress did not get any better." The complainant said she arranged a meeting with the actress to discuss her stress and the latter "reacted sympathetically" to her. Afterward, the trio attended group therapy sessions.

In February 2021, an osteopath recommended that Genaro take a three-day medical leave to relieve her "added stress." Though the osteopath advised the former nanny to resign from her job, Genaro insisted to continue working until a replacement is found.

During her "stress leave," Genaro alleged that Sudeikis demanded to speak with her and fired her immediately when she declined to speak with him following her physician's advice.

Genaro said in the lawsuit that "her termination was because of her disability of anxiety/depression, and for seeking the reasonable accommodation of a three-day leave of absence for same."

Genaro is seeking damages for discrimination, failure to accommodate her "disability of anxiety/depression," failure to engage in the interactive process and retaliation.

"Employees are must [sic] vulnerable when they need time off to care for themselves," a lawyer for Genaro, Ron Zambrano, said in a statement published by E! News. "Laws are in place for just that reason, to afford them peace of mind to take that time without fear of losing their job."

Olivia Wilde is among the famous faces who pop up for socially-distanced conversations during "How It Ends" -- many shot outside the A-listers' real-life homes
Olivia Wilde is among the famous faces who pop up for socially-distanced conversations during "How It Ends" -- many shot outside the A-listers' real-life homes AFP / Jean-Baptiste Lacroix