It is generally recommended to keep the aquarium filter running 24/7. The filter helps maintain water quality, oxygenation, and circulation, which are essential for the well-being of the fish and the overall ecosystem. Switching off the filter at night can disrupt the nitrogen cycle and cause oxygen depletion. However, in some cases, reducing the flow rate or using a quieter filter may be preferable during sleeping hours.