B.G 2.14
मात्रास्पर्शास्तु कौन्तेय शीतोष्णसुखदुःखदाः। आगमापायिनोऽनित्यास्तांस्तितिक्षस्व भारत ॥ २-१४॥
mātrāsparśāstu kauntēya śītōṣṇasukhaduḥkhadāḥ। āgamāpāyinō'nityāstāṁstitikṣasva bhārata ॥ 2-14॥
O Kunti's Son, the contact of sense objects with senses causes pleasure and pain through the sensation of cold and heat. They come and go and are impermanent. Oh Arjuna, just endure them with firmness.
Gīta Bhāshya 2.14
It is the false attachment, 'abhimāna', that causes misery. In sleep, this attachment is absent and thus there is no misery.
Even then, if Arjuna is worried thinking he cannot see his relative, the 'matra-sparsha'(2-14) verse advocates that Arjuna should not worry. Senses perceive objects. One develops attachment when senses come in contact with the sense objects. From it arises the sensation of cold and heat, pleasure and pain. It is the body that comes in contact with cold and heat. It is 'atman' that experiences cold and heat, which causes pleasure and pain.
Atman does not on its own become miserable. Why? Because sensations are transitory, and they come and go. If the atman is itself the cause, then even in sleep one should experience pleasure and pain. But only in the awakened state, because of the contact of senses with the sense objects, one experiences pleasure and pain respectively, not otherwise.Thus, atman is not the root cause, but only instrumental.
The relationship of 'atman' is only that of topic and the sentiment attached towards that topic, no other. It is transient (agamapayi) like a stream, and not permanent. It is impermanent (anitya) because senses do not operate in deep sleep.
Therefore, it is only the false attachment towards the body that causes pleasure and pain. One who has freed himself from such attachment does not experience misery because of the death of relatives. Therefore, one should leave attachment to oneself (abhimanam) and endure with firmness the heat and cold.