Our Table Rule disallows access to DM books during a session (DMG, MM, adventures, etc.), with a handful of exceptions. Druids and casters capable of summoning monsters are allowed access to the MM. If a player has a known magic item and has forgotten how it works, they may access the DMG to look it up (this saves the DM time, who can continue running the game while the player does the work). Of course, we now play on Roll20, so technically, none of this is enforceable. Thankfully, I play with a bunch of players who are trustworthy and don't want to ruin their own fun.
Away from the game, it's nearly impossible to keep people from looking at DM books, especially since my current group has 4 DMs in it! The only real "rule" we have is that is one of the DMs is either running or planning to run an adventure, everyone keeps out of it (except the monster and magic item sections, which is often scavenged for other games).