I see nothing particularly wrong with a man discreetly removing his shirt in a darkened cabin on an overnight flight. Avert your eyes if it offends. Gaze on longingly if it is stimulating. Ignore it otherwise.
I don't travel with pajamas. One more thing to carry. For overnight flights I wear light casual clothing that I will loosen but keep on. I hadn't though about taking my shirt off entirely but will may consider it if the cabin becomes too warm.