Moffat wrote on his BBC blog that Smith often breaks parts of the set during filming and that the show recreated one accident for tomorrow's episode.
"There's a really nice accidental moment where the Doctor hangs from the strap on the ceiling and it breaks," he said.
"The very first time Matt did it, it was an accident - he wasn't supposed to do that, it's just typical Matt, breaking everything - but the director liked it, so he kept it in. The version we see on screen isn't the real accident, it's him doing it on purpose, but I do think it is very funny."
Moffat continued: "I think particularly the looks from the girls and the fact that he doesn't mention it at all - he just tries to carry it off as a sort of Stan Laurel moment. It's extremely charming."
Doctor Who continues tomorrow at 6.20pm on BBC One.