answer:The way to prevent muscle soreness after working out is to stretch well AFTER the exercise, It has to be immediately after, at the end of the work out. You have to move the build up of lactic acid outof the muscles, and stretching helps to do that. The stretching helps with working the muscle, but if you have injured, pulled, or strained the muscle that is completely different. If the pain you speak of was happening from your bed, it would happen whether you worked out or not. Only you can narrow down the cause by paying attention to when it happens and what you did.