The easiest way to brace a water heater is to install a pre-approved bracing system available at most hardware stores. Make sure it has the State of California Division of the State Architect's stamp of approval on the box before purchasing.

The following diagram depicts one of several acceptable methods published by the State Architect. For that agency's full publication of water heater bracing techniques, you can download the entire report from that agency (Adobe Acrobat / PDF file). The report also lists manufacturers of kits that you can purchase to do this work.