The simple fact the filter media was changed does have an effect on your cycled tank.
Basically your bacterial colony lives inside the filter media as well as all over inside the tank on substrate, plants and decor. So changing the filter media will diminish your bacterial colony that is needed to deal with the ammonia and nitrite that occurs.
The cloudy water is very likely to be a bacterial bloom, meaning your bacteria is trying to form to get back to the numbers needed to deal with your tank. In short its either a spike or a mini cycle.
Keep a good eye on your water parameters, anything above 0.5ppm ammonia or nitrite, do a water change to lower these levels. Remember that ammonia and nitrite are toxic to your stocking.
This should level out fairly quickly but as mentioned, keep an eye on water parameters and the behaviour of your fish. Lethargy, gasping, red gills, at surface of water etc etc, then something is amiss and likely due to either ammonia or nitrite or even both.
For future references and a valuable lesson learned here, changing your filter media should not happen unless the filter media is literally falling apart, and even then only change up to half of filter media at a time (do half of filter during one week of water change then do the other half of filter media on another week of water change maintenance)
But generally speaking the gunk thats in your filter media is likely to be bacteria as well as debris, so if it gets too clogged then simply rinsing the media, again, up to half of the filter media at a time, in old tank water during weekly water change /maintenance.
Don't be too enthusiastic with your cleaning of filter media trying to get it back to white or whatever colour it was, just simply give it a squeeze or two in the old tank water to try and keep your bacteria mostly on the media but getting rid of the gunk.
Another point of filter maintenance, if you see the water flow getting slow, that could be down to the filter media getting too clogged with gunk, but it could also be the filter impeller needing cleaned. This is a magnetic propeller if you like, the magnetics get slowed down if theres too much gunk in the filter housing where this impeller is, a toothbrush or a little wire brush does wonders for this type of job.
Don't worry, we all have been there and learned this way too. It's good you're asking these types of questions and this type of mistake is more comon than you may think but its not all bad as long as noticed early and learned for the next time.
This is how most of us has learned some of the do's and don'ts of this hobby