Rommy Boco fired Stanley ahead after 65 minutes and the Benin international's ninth goal of the season proved to be decisive.
Cook's promotion-chasing side were guilty of squandering a host of opportunities either side of the goal and the Spireites boss said: "It was always going to be difficult. The (Stanley) lads were always going to be up for it with a manager coming back.
"It's a great win for Accrington but we are disappointed as we are looking for promotion but we have a habit of conceding goals and not taking our chances and with that you do not win games.
"It wasn't for lack of effort, we dominated for long spells for we couldn't finish but all we can do is keep working hard."