When Matilda came along, Mara was already a huge fan of the character because her mom, Suzie, had read her the book throughout childhood. In her 2016 autobiography, Where Am I Now?, Mara also recalled Suzie encouraging her to go for the role because she admired the fact that Matilda is a strong female character.

But soon after filming for the movie began, Suzie was diagnosed with breast cancer — and Danny and Rhea did not hesitate to step up and support Mara. 

In her book, Mara reveals that the couple offered to watch her anytime her parents needed to be at the hospital, and she said that the time she spent with them was a welcome distraction from the sadness going on in her personal life. 

Source: https://www.buzzfeed.com/stephaniesoteriou/danny-devito-rhea-perlman-parents-matilda-married-irl