Pain is vital for healing, as it makes you move differently, think and behave differently. It can, however, become problematic when it doesn't ease off as an injury heals. Sometimes it can act so out of sorts that the pain actually gets worse long after we have healed.
One way to overcome this is to understand what input your brain perceives as 'danger' and what input your brain perceives as 'safety'. This can be a very wide range of things, from the obvious things such as stress vs. relaxation, to more abstract like seeing someone pick up a box or a memory passing through your thoughts.
Pain is not necessarily brought on by your postural positions or any mechanical input for that matter, and nociception (danger signal sent to brain) is actually occurring all the time. There's even nociception happening right now in your body! It's up to our brains to decide what to do about the signal and things like pressure on the skin from your chair or the waistband on your trousers are usually waved off as 'not a threat'. When it comes down to it, it's truly our thoughts and beliefs that are the deciding factors.
Our brain cross-references the danger signal with all the other information available including our memories, any sensory information like visual or auditory, the conditions that we are in, and this all happens in a split second on a subconscious level. If we believe that a certain movement or position is bad, or we have a memory of something hurting us in the past, our brain will send an alarm signal that is in line with that level of perceived threat.
If you struggle with persistent pain and flare ups keeping a daily journal can help you discover how your thoughts and feelings affect your pain. Were you tired? Stressed? Hungry? Do you have a belief about the situation? Was a particular person around? And you can do the same for things that make you feel better or safe. Maybe a relaxing bath helps ease your low back pain, or talking to a certain person, or maybe on days that you feel well rested you don't notice any flare ups. Take notice if a particular day of the week is better than others - does your back hurt more on a Monday than at the end of the day on Friday, or vice versa?
Avoiding pain only brings temporary relief but taking an active role in understanding your pain better can be empowering and healing in itself. It can actually change the way your brain processes danger signals and reduce how many sensors are dedicated to your pain, bringing them back down to pre-injury levels via a process called neuroplasticity. Give this mindulfness activity a try and see how awareness and understanding can change your experience of pain.