Is it okay to turn off the water at the main when going on vacation (5 days) if you have a gas water heater? Also, does the water company care if you do that or should they be notified?

Someone told us it wouldn't be good if the water heater got a leak and then couldn't fill up.

We have always had various leaks, etc. concerning our plumbing so I don't feel comfortable leaving for 5 days and leaving the water on.

Thanks for help!