I was told about an old science fiction novel, where the main character-astronaut either travels to his own planet in future or to another planet through the wormhole of some kind. Upon his arrival he sees the local inhabitants as an air floating spheres. At some point he manages to interact with one of them when it tells him a story of their life and evolution. In the beginning they were very human-like creatures, when later they created technology that helps them with physical labor, so they got rid of their arms. Later on they discovered a floating way of transportation, so they got rid of their legs. Finally they found a way to feed their brains without need of real food, so they totally got rid of bodies and placed their brains into spheres of some kind. So now they just floating around their home planet thinking and communicating with each other telepathically.
The plot may very like sound as the lyrics of a song "In The Year 2525" by Zager And Evans, but it must be a novel for sure. Is anyone familiar with such a story?