Powering LEDs using transistors controlled by arduino mega

If that is a small squarish 9V battery, you will find they don't have much longevity, with just a few hundred mAH of capacity.

You could organize the LEDs to better use the available voltage and current.
Instead of having all 5 LEDs in parallel, you could have at least 2 in series sharing the same 6.2mA of current, and maybe even 3 depending on the Vf of the LEDs, each transistor then driving 2 or 3 strings of LEDs (vs 5 strings of 1 LED). You will need another resistor or two per LED, but your current draw will be greatly reduced without reducing brightness.

9V - resistor - LED anode, cathode to next LED anode, cathode to NPN collector, emitter to Gnd.

Then each transistor will only switch 18-19 mA, and not 31-32mA.
To turn on the 2n2222a, a base resistor of ~390 ohm will let ~11mA into the base which, should be enough for full turn on at the low current levels you have.