in the mega millions participate most if the states from the US, but this doesn’t make a difference. You can still play if you reside in another state, actualy you can play even if you would live in Europe or anywhere else.
See here more details about the Mega Millions Lottery if interested
12 States are involved in the Mega Millions Lottery. However, they include some big population states like; California, Texas, Illinois and New York.