Wagner held a 42-39 lead with 1:56 left, but Mavraides buried a 3-pointer to tie the score with 47 seconds left, setting up Maddox's game-winning play. He took a pass from Douglas Davis, dunked and was fouled by Tyler Murray.
Maddox hit a free throw to complete the three-point play and Marcus Schroeder had a steal, his seventh of the game, to seal the victory.
It was Maddox's only basket of the game.
Princeton (6-4), which has won three consecutive games, shot 34 percent from the field (17-for-50) and 18.5 percent from the 3-point line (5-for-27).