Android M Developer Preview is now available for all Xperia device under Sony’s Open Device program and can be flashed to test all the new features the successor of Lollipop has to offer.
Android M AOSP builds was earlier available for the Google Nexus devices after it was introduced in Google I/O 2015. But now Sony devices have joined that list through its Open Device program with which the developer can now use the Xperia devices to test the apps for better working or compatibility with the OS.
Sony has also provided a list of devices for which the developer preview is available. So if you are interested all you got to do is just follow this guide but do remember its not as stable as the regular build so you are testing it own your own risk.