Hi! This a very good question. The face and head have a number of nerves that intersect and send "messages" back and forth. There is also a pairing of nerves that go to the teeth, face, jaw, ears, neck etc. Any time you drill on a tooth, the nerve gets "traumatized". While the dentist was drilling on the upper tooth, the nerve directly below could be "sympathetic". Since that nerve had already been through trauma, it may have resurrected because it had not healed totally. This is common. If an OTC pain relief does not help, call your dentist. This could resolve by itself. But please tell him/her. This can be more complicated than this simple explanantion, but it is easily resolved. If you have any other questions, please ask me, I will help you the very best I can.
REMEMBER to click the ACCEPT button if this has helped you. Thanks!!