When you tried it again later, did it take another hour to malfunction? If so then the electronics might be overheating from the light bulb and you need to lower the wattage.
If it appears to be permanently stuck cycling through brightness settings, that sounds like a defective electronic board. If so then it's not serviceable (unless you are a devoted electronics hobbyist) and should be returned.
Possibly it's getting RFI (radio-frequency interference) from a nearby transmitter such as a cell phone, cordless phone, or wireless computer network. RF noise also comes from motors, especially small appliances like hair dryers. RF that leaks into electronic control chips masquerades as computer pulses, causing malfunction. A cheap device won't have protective isolation from RFI.
Possibly it's getting so-called X-10 signals over the power lines from a neighbor with a "smart house", or even digitial interference from one of your own devices over the power lines. For instance, a "smart" ceiling fan.
I believe most touch lamps usually use capacitative sensing. Touching the exterior metal, which has a small charge built up on it, adds capacitance and allows charge to quickly redistribute by (harmlessly) flowing into your body. So if the touch-sensitive portion of the lamp contacts a metal object that is electrically grounded, it might constantly sense a "touch" event and keep cycling. That would be a very bad design, but who knows?
Try the lamp someplace besides your house, if you can. That will rule out local interference. You can search for RFI sources in your house using a TV with an indoor antenna, looking for herringbone, speckle, etc. Or use an AM radio to listen for crackle. This is mainly helpful for intermittent malfunction (now you see it, now you don't).
But, eeyore, something tells me you're going to end up exchanging it for one that's not broken.

"When all else fails, read the manual."
