Elevate water heater next to ceiling in garage to gain floor space
The Uniform Plumbing Code has some language regarding placement, the spirit of which seems to require access for "cleaning... lubrication... adjustment" and other types of service.

It doesn't say easy access (in fact you are allowed to place water heaters in attics, but if you do "the passageway... and area adjacent to the appliance must be floored"). I am thinking that if you built a fixed ladder (maybe against the wall to save the space you are elevating it to gain) up to the platform you would be OK. Final word would rest with your AHJ. Always ensure clearances and other installation requirements in the manufacturer's instructions are adhered to, that is all over the code.  

UPC 504.3.1- The clearances shall not be such as to interfere with... accessibility for servicing.

UPC 505.1- Each such appliance shall be installed in a location approved by the Authority Having Jurisdiction...

UPC 507.26 Accessibility For Service- Appliance shall be located... so as to permit access to the appliance.