Macey, 28, re-joined the Hatters on a permanent basis in June last year after a brief loan spell at Kenilworth Road in 2017.
His sole appearance for the club this season came in the 3-2 Carabao Cup First Round defeat against Newport County.
The keeper is eligible for Portsmouth's first match under new Head Coach John Mousinho against Exeter City tomorrow.
Best of luck at Fratton Park, Matt!