There are no audio system security codes for Lexus LS cars sold in North America after the 1994 model year. The first thing I would do is to make sure that the battery terminals and cable clamps are absolutely spotlessly clean - bright and shiny. Use a battery terminal/cable clamp cleaning tool, baking soda and water. I think my clamp/terminal cleaning tools was less than $5 at an auto parts store.
Yes, check to see if the battery needs water and fill it to the guide marks only with distilled water - assuming it is not one of those supposedly maintenance free batteries. Batteries sometimes fail prematurely but it's unusual. I've had a battery (Interstate brand) last less than one year.
Many auto parts stores and maybe a Walmart will test a battery for you. An inexpensive specific gravity battery tester and/or a trickle charger can also often show the condition of a battery. And sometimes connections between battery cells corrode/break and reconnect randomly but usually only when a battery is at least several years old.
And of course the problem could be caused by something more serious - such as a failed starter which any competent repair shop can test by seeing how many amps it's drawing.