(a) It is wise to sleep under a tree during the day. During day, plants take up carbon dioxide for photosynthesis and give out oxygen. Humans require oxygen for respiration. Therefore, while sleeping under a tree during daytime, one gets oxygen-rich air.
(b) On the other hand, during night, plants also respire. They take up oxygen and give out carbon dioxide. Therefore, if one sleeps under a tree during night, he/she will get oxygen-deficient air.