In the film, Stiller plays a museum night watchman shocked to discover everything comes to life when the sun goes down.
Williams plays a statue of Teddy Roosevelt who offers the anxious guard advice on how to control the museum's nocturnal population.
Director Shawn Levy spoke before Sunday's screening about trying to capture some of the "magic" of the actual Museum of Natural History and put it on the big screen.
Stiller and his wife, actress Christine Taylor, his parents, Jerry Stiller and Anne Meara, and his co-stars -- Carla Gugino, Mickey Rooney, Ricky Gervais, Paul Rudd, Rami Malek, Patrick Gallagher and Mizuo Peck -- all attended the event, as did Milos Forman, Michael Imperioli and Adrian Grenier.
Afterward, families were invited to sleep over at the museum and explore its darkened halls with flashlights.
Starting next month, the institution's "A Night at the Museum" program will allow the public to camp at the museum on select dates for $79 a person.
Exploding whale video goes viral on Internet
Mathematician offers formula for finding the perfect Christmas tree