The potential energy of the electron decreases as it comes near to a proton.
We know from physics that the potential energy
#color(blue)(bar(ul(|color(white)(a/a)U = (kqQ)/rcolor(white)(a/a)|)))" "#
The charge on an electron is -1, and the charge on a proton is +1.
This means that, as the electron gets closer to the nucleus, the potential energy becomes increasingly negative.