Hi OP,
How old are you?
Do you have any chronic conditions such as diabetes, asthma, blood pressure? All under control as far as you know?
Have you started any new medicine/ exercise regime in the last few weeks?
Has anyone close to you had any infections? Covid?
When you say certain positions are ok, others trigger it, does it make a difference of you lie on your left or right side?
Honestly? I'd speak to a doctor/ health hotline (I'm not in UK so not sure of current NHS services) and get your heart checked, amongst other things.
If it's truly the worst pain you've ever had, and it's making your arms feel week/ numb, is worth checking. It may be a trapped nerve in your back, but that doesn't explain the knees and toes.
It could well be a virus, but it could be something more interesting.
I know seeing a doctor is a nightmare at the moment, but I wouldn't put this off.
Equally, it's the middle of the night, so please don't let me freak you out 😊