Idigestion may be the cause. Try to correlate what you had to eat and how long before you went to bed. Eating food that is too greasy or too late can cause acid reflux
when you lay down. Try eating a little less, i.e. stop before you feel FULL.
Adjust your posture, sit up straight and push shoulders back, slouching especially over a keyboard for long periods will also give you these symptoms.
I've had angina
and a heart bypass
about 8 yrs ago so it worries me when I get similar pains but I can usually get rid of them by straightening up, having a good belch, taking an antacid
Hope this helps.