I seriously doubt that the handlebar material is a dominant factor, because:
Taking this right back to basics, it is the forces that are applied to your body through the contact points that cause the damage.
In the case of riding a bike, the static components of those forces are the grips, saddle and pedals pushing you up to support your weight - accepting of course that as you move around on the bike and clench / relax on the grips, the distribution of those forces will change.
Superimposed, there are dynamic forces applied to the tyre contact points as you traverse the terrain. These forces pass through all of the components of the bike before passing through the contact points and arriving at your body. Hopefully (usually) they will be attenuated by the mechanical characteristics of those components.
Having set the scene, its impossible to tell with the information given what specifically is dominant in causing the discomfort. It would be interesting to understand what bike you are riding, its condition, and the terrain / distance you are traversing by the way.
I think I'd begin with the basics of checking the fit of the bike. For example, something as simple as tilt forward on the saddle can transfer weight to the hands and cause hand problems -don't ask me how I know. Also, as has been alluded to above, check out the bike is in good order and the tyres are at an appropriate pressure for the terrain and your weight.
Edited to add, changing hand position periodically can be beneficial. In the context of an MTB, use / install and use bar ends.