Manager Dale Brooks said: "I would like to thank Matty for the commitment he has showed during his time at the club. I would also like to wish him all the best with his future career."
Foy played 15 games for Lowestoft Town during his loan, scoring two goals.