This is why I love this site. I've been doing networking for many years and I'm not a total novice in databases, but I had no idea MySQL had these functions.
I'd still much rather store something that can be indexed in a btree than something where you have to always call a function on and do full table scans. Of course, before displaying to the user you'd use long2ip again (or the database equivalent you mentioned; I usually avoid doing unnecessary computations on the database and, instead, let the application handle display logic).
In MySQL for example, that's what INET_ATON() and INET_NTOA() are for, to convert between binary and display.
Analogous to storing timestamps but displaying as datetimes in a timezone.