While you won't find a 24/7 supermarket in Bologna, there are some that stay open pretty late!
Supermarkets in Italy are open on Sundays, differently from many other European countries. Most supermarkets will close around 8-9 pm though, but there are some in the city center that are open later, like this one that is open until 11:30 pm or this one, open until 10 pm. Keep in mind that is prohibited to sell alcohol (wine included) after 10 pm, but you can, of course, have a drink at the bar.
Go check out my guide for the best free things to do as well as itineraries and travel tips to make your trip unforgettable.