If the muscles and bones of the chest wall have been strained or injured in some way, any type of movement of the torso may cause pain. As a result, a person can experience chest pain while a person is sleeping, particularly if they frequently change positions or fall asleep on their chest.