Thanks for choosing HealthcareMagic forum.
Your problem seems to be due to a muscle spasm due to repeated overworking of your intercostal muscles.You need to stop sleeping on that side of your chest.Do a hot fomentation, apply local analgesic
ointment. You can use a chest belt for more relief.
Dr. Rakhi Tayal