If you turn the filter off it takes about 30 minutes for the beneficial bacteria to begin to die off. While they will not all die for a while longer than that, the longer the filter is off the more you will lose. So when you turn the filter back on the bacteria that are left will either have to work much harder or will not be enough to cover the
ammonia load that the fish put out and will die off. Then you will lose your cycle and have to start over. Some hardy fish can stand this and some more fragile fish cannot and will die. So it is always a good thing to keep the filter running as much as possible. When you need to turn it off, like for filter maintenance, it is a good idea not to have it off longer than absolutely necessary. There may be times you cannot help it but then you will probably have a mini cycle that may last a few days and you may have to do extra water changes to help your fish get through it.
Whenever your filter has been off for an extended period of time you should always make sure and frequently check for ammonia, nitrites and nitrates in your water.
Rose