Celeste and Jesse Forever centers on a divorced couple whose on-off romance is seemingly ended when Samberg's character fathers a child with another woman.
In an interview with USA Today, Samberg revealed that the movie led him to discover his own desire to start a family.
"Time has passed, but I definitely feel more ready to have a child now than before we started shooting the movie," Samberg explained.
He added: "I was definitely forced into that head space and thought about what it would actually be like [to have a child]."
Samberg is currently dating singer Joanna Newsom, who has worked with artists including The Roots, The Pleased and Golden Shoulders.
Celeste and Jesse Forever is now playing in the US. A UK release date has not yet been confirmed.
Watch a trailer for Celeste and Jesse Forever below: