There are 2 bars on the arrivals level that are open 24h according to the AENA website (
http://www.aena.es/en/barcelona-airp...staurants.html), Caffe di Fiore and Lizarrán.
I know these 2, and they are not exactly the nicest places to spend the time (no nice corners to sit or anything), but at least you won’t starve. There might be others, but only for these 2 the 24h opening times are mentioned.