"We all dressed up," Garner told TV's Extra.
"I dressed up as a ninja and Ben dressed up as Batman for Sam, which was the best dad moment in history. It was very sweet."
Affleck will be seen later this month playing the Caped Crusader in Batman v. Superman: Dawn of Justice. He and Garner announced last year they had split up after a decade of marriage.