The black definitely stays closed until you're ready to dump it. There are several schools of thought on the grey tank. Some keep it closed and dump it when it approaches full. Other leave it open until they need the grey water to flush the lines after dumping the black tank. More on this in a minute. I occasionally leave the grey tank open if I’m doing multiple loads of laundry and don’t want to forget about dumping the grey tank between loads.
When you dump your black tank, you want to dump your grey tank afterwards in order to get all the black waste out of the lines. You wouldn’t want to pack up the hoses without them being relatively clean. I typically dump my black tank in the morning. I make sure the grey tank is closed before taking a shower. After the shower I typically have sufficient grey water to dump after dumping the black tank.