Suttas such as AN 4.123 say (per translation):
If a deva does not have a physical body, how does a deva age and how does a deva have a "lifespan"? In other words, what causes make the deva fall away from their pure abode? For example, in the case of a physical person who has mastered jhana, I imagine they would remain a master of jhana in their life on earth until some very serious decay occurred to their physical body. I can see no reason why an adept yogi would lose their skill of jhana (apart from some serious physical illness or decay). Therefore, how do devas lose whatever conditions that sustain their pure abode? Do any suttas or commentaries offer any explanation of this? ThanksThere is the case where an individual, with the abandoning of pleasure & stress — as with the earlier disappearance of elation & distress — enters & remains in the fourth jhana: purity of equanimity & mindfulness, neither-pleasure-nor-pain. He savors that, longs for that, finds satisfaction through that. Staying there — fixed on that, dwelling there often, not falling away from that — then when he dies he reappears in conjunction with the Vehapphala devas. The Vehapphala devas, monks, have a life-span of 500 eons. A run-of-the-mill person having stayed there, having used up all the life-span of those devas, goes to hell, to the animal womb, to the state of the hungry shades. But a disciple of the Blessed One, having stayed there, having used up all the life-span of those devas, is unbound right in that state of being. This, monks, is the difference, this the distinction, this the distinguishing factor, between an educated disciple of the noble ones and an uneducated run-of-the-mill person, when there is a destination, a reappearing.
https://www.accesstoinsight.org/tipitak ... .than.html