Air temperatures are increasing because of global climate change. A warming phenomenon strongly related to global climate change is the urban heat island. It has been shown that the hotter temperatures occurring in cities during the summer negatively affect human wellbeing, but little is known about the potential mechanisms underlying the relationships between hotter temperatures, cognitive psychological resources and wellbeing. The aim of the present research is to understand whether, and how, spending time in urban green spaces, which can be considered as a specific kind of Nature-Based Solution (NBS), helps the recovery of cognitive resources and wellbeing. The main hypothesis is that contact with urban green is related to wellbeing through the depletion of cognitive resources (i.e., ego depletion). Moreover, we expected that individuals showing higher scores of ego depletion also report a higher estimate of the maximum temperature reached during the summer. The results of a survey (N = 115) conducted among visitors to Parco Nord Milano, a large urban park located in Milan (Italy), point out that people visiting the park during the summer show a higher level of wellbeing as well as a lower level of ego depletion. A mediation analysis shows that visiting urban green spaces is associated with greater wellbeing through less ego depletion. Our results also point out that, as expected, people showing a higher level of ego depletion tend to overestimate the maximum air temperature. Implications for future studies and applied interventions regarding the role of NBS to promote human wellbeing are discussed.