I don't know what country you live but I imagine it's similar in most places?
Go to your local big supermarket/grocery store, go to the produce or bread/baked goods (anything with "fresh food") dept, and ask them, when do you do your final reductions for food, a rough time, as it will change depending on how much of the stock they have to reduce, and get there early
Is it weird for a grown man to be asking retail workers about that, a little, but I can guarantee those retail workers have seen worse, just be nice and normal about it, they don't need your life story or excuses, just ask nicely, you will not be the weirdest person that they've had to deal with that day
Supermarkets here in the UK can price things down to 90/95% off on some things at certain times to get some money for food, rather than having to write the food off altogether as waste as it goes against a waste budget. It may not always be this %, certain products get reduced in increments during the day and will be worth picking up to some people at 20% off, or 50%, but if you're looking for the cheapest possible food, last reductions, on the late shift is your best best
Will you eat well or nutritional stuff? Probably not. But for litteral pence you could get a loaf of bread, and I mean picking up money off the road going towards the store money. Eating half a loaf will fill you up and give you enough energy to at least make it through the next day
Anyway, good luck