The short answer is, yes, you can save money and energy by turning your gas water heater down when it's not needed.
- And, yes, a timer on an electric water heater can save you some money if you never need hot water during the night.
- But I've never heard of a timer for a gas water heater and I seriously doubt one exists commercially.
Your water heater fires from time to time because of what's called 'standby loss', which means the heat that's lost from a water heater even when it's not being used.
- This is partly heat lost through the insulation and outer casing, but even moreso through the center steel tube that carries the flue gases from the burner at the bottom up through the tank and out the metal flue on top.
- This is an open, uninsulated tube and is a major reason why standard water heaters can't get much above 80% efficiency.
An enterprising enough person with good shop skills and a moderate disregard for his own safety could likely build some electric based contraption that would interrupt the temperature bulb but the minor energy savings of a few dollars a month is not worth the risk of blowing up yours and your neighbor's houses.
The best you can do is to keep the thermostat on yours turned down as low as possible while still getting adequate hot water in your shower.