O’Donnell signed for the Spireites last summer after being released by Sheffield Wednesday.
He made his debut as a substitute in the Johnstone’s Paint Trophy tie against Oldham Athletic in early September, replacing the injured Tommy Lee.
The 24-year-old played in the following 15 games before Tommy regained full fitness and took back his place between the posts.
Subject to the completion of the necessary paperwork, O’Donnell is expected to make his debut for the Hatters in their game at home to Mansfield Town on Tuesday night.
Spireites boss Paul Cook knows his Stockport counterpart Jim Gannon from their time together as team-mates at Edgeley Park.