The 28-year-old made a total of 68 appearances in two years with the Hatters and will join Pompey when his contract expires next week.
"We've had to fight off Championship clubs, but he really bought into the project," said manager Danny Cowley.
"He is certainly someone who we feel can help when we're trying to break sides down and we're looking forward to working with him," added Cowley.
Need a VPN? Or seeking to switch? Then support Tribal Football by clicking here to sign up with our official partners NordVPN. Not only will you receive the best VPN experience, but also great discounts by signing up via Tribal Football. Thanks for your support!