The pain could be due to the acid in the vomit or other issues. You could try taking some OTC antacids and see if the pain improves. If you do not observe any improvement or the pain is extremely severe or breathing becomes laborious, it is advised to see a doctor immediately.
Hope this helps.
I had a vommiting bout which lasted all day two days ago and although I have not been sick since I have a lot of pain in lower back when I cough.
Could it be just from retching thank you