Toothache is a lifetime experience for someone who has experienced the pain of acute pulpitis. Be it sharp, acute, transient pain for seconds or some dull aching, continuous vauge pain in the facial region, tooth pain is really intolerable to ignore. Getting rid of the toothache is the only thing the sufferer thinks of at the time because, foods look painful, all parties are meaningless if you cannot eat anything, even water !
The type of pain you have is very important to know the condition you might be suffering with. For example, continuous pain that lasts for minutes to hours even after removal of an offending stimulus ( cold, heat, air or some acidic foods) or spontaneous pain without any stimulus often represents irreversible pulpitis, which mandates that you should have a root canal treatment rather than a simple tooth filling. The tooth may seem perfectly fine from outside but there may be a large decay between two teeth which can be seen only on radiographs. Or, your teeth may be without any decay but the pain may be from some periodontal problems (problems arising from gums and other supporting structures of tooth) The decision of treatment plan whether you should get a root canal treatment or a simple restoration will be okay must be done by your dentist after listening to your history of illness, clinical examination and radiographic evaluation. There's no point asking a dentist over the phone about whether you need an RCT or not.
There is no any medication to reverse your tooth decay once a clinically visible cavitated lesion is formed, the only treatment is to remove the caries and then restore it. But for the immediate pain relief, you can avoid the stimulus causing pain. Warm water can be helpful to relieve pain in some tooth sensitivity cases. Lying down or sleeping aggravates the pain in irreversible pulpitis due to increased blood pressure in the pulpal tissues while sleeping or lying down, so, upright positioning provides relief relatively. Avoid taking too cold or too hot foods and acidic foods and beverages like carbonated soda drinks, citric fruits, sweets, ice cream, etc.
If you cannot tolerate the dental pain, you may take over the counter medications such as Paracetamol 500mg or Ibuprofen 400mg for immediate pain relief. But that does not mean you can defer the dental treatment any further. You do not feel the pain doesn't mean that the underlying problem is cured, the bacteria doesn't die itself. You wouldn't want the disease progress further and come back again larger and stronger which causes more pain, loss of time and loss of money.
A stitch in time saves nine is very much applicable in the field of dentistry.