Some people are more comfortable sleeping with their arm under their pillow and that's okay and if so then it's not bad for them to sleep with their arm under their pillow.
But for some people including me I notice when I have my arm under my pillow I wake up with my arm in pain and sometimes the arm has become numb due to loss of circulation of the blood.
It's recommended to not sleep with your arm under your pillow but instead sleep with your arm on top of your pillow to help prevent pinching nerves and slowing down blood flow.
If you're arm is not going numb or you're not experiencing any pain from sleeping with your arm under your pillow then there's nothing wrong with it.
Everyone is comfortable sleeping in different positions and ways.