Opps. If it makes you feel any better, I did exactly the same thing a few years ago when I first got into fish keeping. Next morning, tank was cloudy and stinking to high heaven.
What you've got to do is try and get an understanding of how your biological filtration works. Inside your filter you have all your media. A lot of filters have biological filtration which often come in the form of little balls. They also have sponge filtration, this is often what we refer to as mechanical filtration. They may also have some kind of carbon filtration which is usually black. Your biological filtration is where you bacteria live and thrive, this is what deals with ammonia and nitrite. Ammonia is what is produced from your fish when it goes to the toilet, or breathes. It is also produced from decaying matter such as food and plants. Your mechanical filtration is what catches all your waist. This type of filtration can be changed on a regular basis if you want. However, your biological filtration must be cared for very carefully. The bacteria that live in the biological filtration need oxygen to survive. They get this oxygen from water running through the media. As soon as you turn the filters off, the water stops flowing, and the bacteria are starved of oxygen. After four hours, they will all die.
This is what happened with you. So unfortunately, you are going to have to cycle your tank all over again. The reason you have cloudy water is bacteria is building up in the water to deal with the ammonia. These are free swimming bacteria are not the same sort that are found in your filtration. So what you then have to do is a water change every other day and test your water for ammonia, nitrite and eventually nitrate.
When you have established a healthy biological filter, you must never turn it off for too long. You must clean it very carefully and always in existing tank water, never under tap water.
So there you go, you won't make the same mistake again:laugh: