WC,
Thanks for your question.
First, let me assure you that it is very unlikely that your discomfort is a symptom of heart disease. Chest discomfort related to the heart is not affected by position changes. In addition, your symptoms are occurring at rest, rather than with exertion.
Though I'm comfortable in telling you this is not your heart, I can't really tell what the cause might be. Because it is definitely related to position changes, consideration must be given to a musculoskeletal etiology, such as your back and/or ribcage. A gastrointestinal etiology is possible, though this is just a guess.
The bottom line is: you need to see your physician for his evaluation. He/she will ask you several questions and then examine you. Then he/she will be in a better position to determine what the possible causes might be. Your doctor might request some laboratory and/or radiology tests to help him get to the bottom of things.
Hope this has been helpful. Feel better.
Martin Cane, M.D.