hello and welcome to hcm forum,
i would be glad to answer your query,
first of all, it is quite clear that pain and swelling is due to infection. It is most probably from one of the tooth that is grossly decayed.
Pain which increases on lying down is from infected tooth,
I will advise you to see a dentist
Avoid applying hot compresses over the swelling,
perform warm saline rinses(3-4 times/day),
use an antibacterial mouth wash (twice/day).
kindly follow the above instructions until you see your dentist.
i hope this answer was useful,
i wish you good health.