It’s down to the temperature rather than altitude itself… Mach speed will be higher @FL500 than @FL250 as it is colder @FL500. The colder it is, the lower the speed of sound is. But when you reach above certain point, it will first stay the same for a while and then start changing the other way… Mach number will tell you what is the ratio between your speed and the speed of sound at your altitude (or to be more specific… in the outside temp at that altitude)
Check out the graph [Temperature and speed of sound change with altitude](https://upload.wikimedia.org/wikipedia/commons/thumb/9/9d/Comparison_US_standard_atmosphere_1962.svg/1280px-Comparison_US_standard_atmosphere_1962.svg.png)
Latest Answers