What causes pain inn my upper arms especially when I am in bed at night?

Maybe from. Your neck. Maybe a pinched nerve. Consider sleeping without a pillow, laying your head flat, or replacing your pillow for one that supports your neck without tilting your head forward. See your doctor for evaluation.