The reaction that he has at this moment is completely genuine. The director of this movie, Jon Favreau, used a remote control to manually make the jack-in-the-boxes pop up. This excellent directing caused Will Ferrell to have the perfect reaction. There is total anticipation and then surprise during this scene. It is one of the more memorable scenes in this movie for me because, no matter how many times I've seen Elf, I am still startled just like Buddy the Elf.
After I watched this I looked up other creative ways to direct actors so that the acting they do does not come off as phony. In the movie Saving Private Ryan, Stephen Spielberg made every single actor (including Tom Hanks, Matt Damon, and Vin Diesel) go through bootcamp for 10 days. He literally put them through hell so that the actors would get a glimpse as to what war was actually like. He even went as far to feed them all old canned rations and he hired a marine give everyone orders like they were any other soldier.
This just goes to show that direction of the actors is key in making a spot-on performance by the actors and a truly authentic movie.