I did a little checking and indeed found speaker boxes for ceiling applications. They primarily advertised themselves for the sake of fire rating a room and for preventing sound from traveling as easily to the room upstairs. They probably would also be a good idea if you have an unisulated attic above to prevent heat loss. As far as changing sound quality, I can tell you from my days in college when I took a physics of sound class that your answer would be extremely complicated based on a ton of variables. For sure if you want the best high def sound possible you should rely on a free standing speaker that is in an enclosure tuned exactly to the speaker. Ceiling speakers really aren't meant to be for the serious audiophile's primary speaker but rather for background music or surround channels. Plus the direction from above is not ideal for creating optimal sound field.
You should never have a speaker where there is free open space from the front of the speaker to the back. You will kill all of your bass becuase the low frequency will wrap around and cancel out when it hits the mirror image sine wave comming off the back of the speaker. Higher frequency is more directional and won't wrap around. Drywall will for the most part block that wrap around but adding a further sound dampening materials may help more if you want to push up the bass response. You may notice how bose speakers have a tube for the bass comming off the back of the speaker the length of which is designed to delay the sound output off the back long enough for the sine wave to be in sync which then amplifies the bass rather than canelling it.
The size and shape of the box as well as the material will change the sound as well. Also if it is packed with sound deadening insulation or not, how much of it and what material it is. There are very smart people working with complex computer modeling figuring out how to build speaker enclosures for specific cones/drivers. They also mainulpulate the crossovers and response at various frequencies to make the enclosure/speaker marriage work its best. Then these people get patents. Don't expect to do this on your own and match a high end free standing speaker.
There would be no way to put a box into a ceiling (with a round speaker) that wouldn't involve making a hole in the drywall that is bigger than the speaker and therefore require patch/float job. Potentially a square speaker could have a box that could be turned sideways and retrofitted without drywall issues. I guess you could also have a box that is multiple pieces which would fit through the hole and then be assembled after it is in the ceiling. That would be cumbersome but possible.
If you have attic above the speaker then you can just go up there and experiment with different situations. Of course open attic will not respond the same as the confined space in your ceiling. Things like truss construction vs dimensional lumber, 5/8 drywall vs 1/2 in, subfloor material above, presence of cross bracing, nearby light cans, and on and on will affect the sound.