She recounts the anecdote in her new memoir, Where Am I Now? True Stories of Girlhood and Accidental Fame, which will be available from Penguin on Sept. 13th, 2016.
In an excerpt revealed by Buzz Books, Wilson explains that she received "the sex talk" from her mother one night while filming Mrs. Doubtfire. Just 6-years-old at the time, Wilson came back to set the next day giddy with grownup knowledge.
"I wasn't focusing on the scene. I was bubbling with excitement, because I knew this thing, this big open secret, and I could not keep it in any longer," she writes.
Unable to keep the secret to herself, Wilson asks Virginia, one of the hair dressers, if she'd ever "done it." Surprised and embarrassed, Virgina walked away without answering.
"As soon as she walked away I announced in a singsong voice, I KNOW ABOUT SE-EX! I KNOW ABOUT SE-EX!' " Wilson remembers.
The crew found her song hilarious, but Wilson's mother was not pleased. "Instantly, I felt humiliated, and worst of all, I knew I had brought it all on myself. I thought I might start crying," she writes.
These Robin Williams Impressions Will Blow Your Mind
Then Williams, dressed in full Mrs. Doubtfire drag, walked up to director Chris Columbus and said laughing, "Did you hear that Mara was asking Virginia about sex?”
That day on set Wilson was filming a scene in which she helped William's onscreen ex-wife, Sally Field, pick out a dress to wear to her birthday party.
"You know, Mara," Chris said, turning to me, "if you want, you can tell Sally her dress is sexy," Wilson remembers the director saying.
Where Am I Now? is available for preorder now.