The Spireites still top the League Two table but a hat-trick from Lee Molyneux saw 10-man Stanley over the line.
"It's near the end of the season and results are important," said Cook. "We have given the teams around us a glimmer of hope and we have got to regroup and focus on our next game and get back to winning ways.
"We were very poor against Accrington but you can't take anything away from Accrington. They deserve the plaudits.
"We gave sloppy goals away and missed some really good chances especially, but the 10 men worked hard for each other and deserve the credit.
"We won't make any excuses, we were poor, but we have 11 games to put it right. It's a body blow for us but we have to bounce back."
Molyneux, on loan from Crewe, opened the scoring for Stanley with a fourth-minute 20-yard free-kick.
He made it two-nil after nine minutes when Danny Webber's penalty was initially saved by Tommy Lee and the wide man followed up.
Stanley were reduced to 10 men after 30 minutes when midfielder Peter Murphy was sent off for a second yellow card - his tackle on Dan Gardner seeing the Spireites midfielder stretchered off and having a precautionary X-ray after the game.
But despite the numerical disadvantage it was Molyneux who stroked home his third goal of the afternoon in first-half injury time.
Cook was sent off with Stanley assistant boss Paul Stevenson for a bit of a confrontation at half-time, Cook accepting his punishment.
Chesterfield dominated possession after the break but could not find a breakthrough until Ian Evatt grabbed a late consolation for the leaders.