Down 30-18 at halftime and still trailing 33-20 with 17:43 remaining, the Quakers (6-18, 3-4) scored nine unanswered points, six by Brooks.
Penn missed its first field goal of the second half, then went 16 of 20 the rest of the way while also making 15 of 19 free throws.
Tied at 48 with 4:44 left, Lewis and Miles Cartwright made back-to-back layups and Lewis hit a 3-pointer for a seven-point cushion.
The Big Green (6-16, 2-6) could get no closer than five thereafter.
Lewis, who had scored a combined 14 points over the Quakers' previous 11 games, was 5 of 6 from the field.
Gabas Maldunas, whose 19 points and 10 rebounds led the Big Green, surpassed 500 career points in two seasons.
The NBA draft is Thursday night (7 ET, ESPN/WatchESPN), and trade talk is picking up. Chad Ford dishes his latest intel on how the draft will go and which teams will make deals.
Get to know the NBA's next crop of superstars.
Marc Spears speaks with Chris Washburn, who was drafted third overall in the 1986 NBA Draft, about how drug addiction cost him almost everything, including his life.