Writer-director Judd Apatow and actress Leslie Mann are a real-life couple and their new film This is 40 sees the pair tackle the middle-age years head-on, with comedy.

The film follows Pete (played by Paul Rudd) and Debbie (portrayed by Mann) as they deal with the effect turning 40 has on their marriage and family. The two characters will be familiar to fans of Apatow’s work, having appeared in his 2007 comedy Knocked Up.

Apatow said he still has affection for those characters, and like many TV lovers, enjoys the idea of following people's stories over several years.

“I wrote a movie about this period of life and I didn’t plan on it being about Pete and Debbie,” he admitted in an interview with CBC’s Q cultural affairs show on Monday.

“Then, inspiration hit me and I thought 'Oh, it’s Pete and Debbie — that’s the perfect casting for a movie about this time of life.'”

Apatow’s comedies have progressed from plumbing the teen years (Freaks and Geeks) and college life (Undeclared) to the insecurity of one's 20s (Knocked Up) and now mid-life in This is 40. He and Mann agree the film draws from their marriage and is even more personal because their own daughters, Maude and Iris, portray Pete and Debbie's daughters onscreen.

“Many events in it actually happened, but the reason it seems real is that we’re thinking about it. It’s the best way to dramatize the struggles we’re having with kids and getting along and aging. On one level, it’s very personal, but it’s also fictional,” Apatow said.

This is 40, which opens in cinemas Friday, is also very funny, tapping into the comedic talent of Albert Brooks, John Lithgow, Megan Fox and Lena Dunham.

For Mann, it felt good to revisit the hyper-stressed Debbie — who was too tightly wound for some in Knocked Up — and try to flesh out her story.

Apatow and Mann talked to Q about their own feelings about turning 40 and why all the movies they've made together are about good people trying to figure out how to make their lives work.