I have done both. I rolled regular behr paint from hd. Few coats it was fine. I also rolled rustoleum which covered better but was black instead of the blue i used from behr. I had to roll bc tank was inside and couldnt move alone
I've always painted them with a roller. IIRC I've used Rustoleum flat black, comes out fine. Less mess than spray.
Just make sure the glass is super clean before you start
Another option is to get a black starboard/ or acrylic, or any other board type that is black and have it cut to the back glass dimensions. Then attach heavy duty velcro pieces(squares 2.5") on the four edges of the tank and the matching oposites on the four edges of the board.
Simply attach the board to the back. You will have the same black background, and in the future, you can simply remove it if you want to...