In an inground pool, the filter is usually the highest point of the system. You must have some pipes that are higher than the filter for water to be coming out. Once the water is drained from those, it will not come out the filter.
I also see no reason to close any valves. The water will drain back into the pool if you leave the valves open and you will then be able to inspect/clean your sand without water in the filter