This sounds like a strain or fatigue injury
to the back. This is very common in people who work in jobs where they have to assume less than ideal body posture. When they do, the muscles in the back fatigue and pain develops. It is quite common for the pain to be more on one side of the back than the other. This is because a lot of the pain in simple back fatigue comes from imbalance between the two groups of muscles on each side of the spine, resulting in 'cramping' of one of the muscle groups. This is called paraspinal muscle spasm and will give you the symptoms you are describing.
In addition to rest and work on your posture while working, antiinflammatory drugs like ibuprofen or naprosyn can be of some help. Additionally, back strengthening exercises and back stretches can be very helpful if performed consistently every day over a period of weeks to months. Your doctor
can give you a list of exercises to perform or you can find them on the internet by going to a reputable health information website.
I suggest speaking with your primary care doctor
who can help advise you as you work through this problem.