How should I treat my neck discomfort from sleeping on airplane upright?

Medical evaluation. See a well trained physician who specializes in spinal disorders. If the problem is minor, you may get relief from simple chiropractic adjustments. If not, other appropriate treatments will be recommended.