Hello, I was diagnosed with chronic tonsilitis lately, like 3-4 days ago, I ate an apple and I developed similar symptoms for 2 days, painful when you swallow, painful when you lay down, even painful in lower-central part of your rib cage when you take a deep breath.
Also painful when you laugh/yawn. The pain subsided on 3rd day, I drank a lot of liquids, consumed mint pills, the normal type you'd buy at a 24/7.
I expected it due to my diagnose, I'd recommend you to visit a doctor, you don't wanna delay any issue if there's any.
Be well soon.