Also, if you get really tired during the long layover, AMS has a nice micro-hotel inside the Terminal, behind security. It's called YOTEL and you can purchase hourly packages. I slept for about 3hrs there, took a shower and was ready to continue my trip. Paid 39 Euro for it.
Check the website here:
www.yotel.com