I have heard some pilots announce "if you want to use the lav, this will be your last chance before landing." I'd appreciate it if it were a standard policy.
Also, it should be more than five or ten minutes. Short notice may create the dreaded "congregating near the lavs" condition, which as we know is the greatest threat to airline safety and national security today.