A firm, but not too hard mattress is always a good idea. Sometimes, just rotating or turning your mattress over is enough. This should be done every six months at least. If your mattress is soft, sagging, or in disrepair, replace it soon.
The problem may not be in the mattress. Upper back and arm pain can be coming from the neck, shoulder, or upper thoracic spine. An exam by a physician or physical therapist can help identify the problem.
A past history of automobile (or other) accident is often present in patients with these symptoms. Good neck support in bed is important. Keeping the arm by the side or supported by a pillow is also helpful. Cortisone treatment into the shoulder may alleviate the symptoms altogether.