It’s not an obligation for men to cover their heads in prayer. If covering the head is regarded in a given place as a form of adornment, then men are encouraged to cover their heads in prayer.
Sheikh M. S. Al-Munajjid, a prominent Saudi Islamic lecturer and author, says: “Allah says: “O Children of Adam! Take your adornment (by wearing your clean clothes) while praying…” (Al-A`raf: 31). If covering the head is customarily regarded as a part of adornment in a particular country, then the head should be covered, otherwise it does not have to be covered.”
Dr. Sano Koutoub Moustapha, professor of Fiqh and its Principles, International Islamic University. Malaysia, adds: “As far as the man’s `awrah (parts of the body which should be covered) in prayer is concerned, the head is not included at all. Therefore, covering is not wajib or obligatory but it is just a recommended act. This is the opinion of the majority of Muslim scholars.”