Did you have a c-section? I found a similar situation on the web in which a woman was told that it was due to 'gas pockets' left after the c-section! The reason it gets up into the shoulder is because 'air rises'. According to that woman the gas pockets can be very painful but the gas is eventually absorbed into the body and moving around helps.
Be sure to tell your doctor about this..Remember this is only one possible explanation and only your doctor can diagnose you. Good luck!