The twins did not eat the cupcakes. that was Stanley's fantasy — them eating the cupcakes, them dying. The opening scene in the Museum was also Stanley's fantasy. Some people are theorizing that the the museum scenes are flash-forward scenes, but i think they're only fantasy.