It started off kind of like mild toothache, in the back teeth on the right hand side. It didn't hurt to chew or swallow or anything so I thought nothing of it. But last night, it intensified and got a LOT worse, and spread to my ear too. I got about one hour of sleep because it hurt so badly. It's only kind of aching now I'm up, and chewing/swallowing is still fine, but I'm worried that it will get worse again tonight and I won't be able to get a decent night's sleep before my exam tomorrow
Anyone have any idea what this might be or how to get rid of it (even temporarily)?
It sounds like it could be sinus pain, possibly sinusitis (where your sinuses become blocked and inflamed). The nerve to your molars is very close to your maxillary sinus (the one over your cheekbone) so inflammation there can cause pain in your teeth, particularly your top molars. It also commonly changes in intensity with position/when you move your head. Do you have any pain or pressure-like feeling over your face on that side?
If it is your sinuses, you can try steaming your head, and you can also try taking decongestants. Ibuprofen will help relieve inflammation and you can take both this and paracetamol for the pain. Heat or ice can also be helpful, and I would personally recommend some sort of strong alcohol like whisky to rinse your mouth with if the pain in your teeth is particularly hellish and you can't sleep-it will at least give some temporary relief. It also helps to sleep on the opposite side of your head at night to allow gravity to help your sinus drain. The entrance to your sinuses is unhelpfully at the top which is why it's common for them to get blocked in the first place. Most cases of sinusitis clear up on their own, but if you have a fever it might point to an infection so a trip to your GP for antibiotics would be a good idea.
I've had sinusitis a few times now and the pain is awful; the only way I could sleep last time was to dose up with the maximum painkillers I could and sleep with my face smooshed into a heat pillow and wake up every few hours to use the bottle of whisky by my bed to numb my gums.