In a statement, Stam said it had "certainly not been an easy decision" to resign, with the 15-time Dutch champions languishing in 12th place in the league after their humbling in Amsterdam.
"I have thought about it well and for a long time. My final conclusion is that it is better for the club, the players and myself if I step aside," said the 47-year-old.
The 1970 European champions said on their website Stam had resigned "with immediate effect", adding they did not want him to leave.