Now or Later. The local anesthetic will wear off in 1-6 hours depending on where it was given. However you can eat anytime that you want but don't eat if you may chew you lip, cheek, tongue because you don't feel them. Best if numb is to eat very easy, slow, and carefully or better yet wait until after it wakes up so you don't do damage to the tongue, lips, etc.
Injections. Depends on whether it was a one tooth injection or a lower block which lasts several hours. It also depends on the type of anesthesia used and whether or not it had adrenaline in it to make it more profound and last longer. If it has adrenaline then it depends on the concentration of the drug. If it is a lower injection and is a blocks and lasts more than 4-5 hours call your doctor.
You can eat anytime. Eating will not harm your composite dental fillings after you have them done. They are cured and ready for use. Just be careful if you are going to try to eat while still numb. You cannot tell temperature on the numb tissue and it may be hard to control where the food is in your mouth. It depends on the type of anesthetic used, how long it acts. Anywhere from 1-4 hours could be the time.