For orally dosed drugs, eating 20-30 minutes after dosing usually helps it absorb by emptying stomach contents (opiates) to make room for the food, so they aren't just sitting there being eaten up by the acid instead of being pushed in to your intestines for absorption.
Also, if you don't eat for more than 5-6 hours, your mood naturally deteriorates and you feel shitty and cranky, making you enjoy your opiates/drugs less. I used to not eat on LSD since I didn't want to, but realized my trip, especially 6-7 hours in without eating, felt a lot better with a little meal. If you're hungry, eat; there's no sense in ignoring our bodies' signals to us.
I recommend dosing oral drugs on an empty stomach (3-4 hours of having not eaten), then eating 20 minutes later. For oral opiates, the food will also help cut down on a lot of nausea.