Chemical, I think. My observation is the following: I mix a little amount (0.05mass%) of SDS with distilled water, and I can make nice foam from it without any problem. But after a few weeks I cannot create nice foam. Probably it is due to the formation of dodecanol from SDS (sodium dodecyl sulphate), but I don't know for sure what it is process, I've never heard about it.

There can be bacterial contamination. Do you mean that this can cause the loss of foamability of the mixture? Can you please clarify me what does bacterial hydrolysis mean?

To tell the truth I didn't find anything in the literature about the hydrolysis of SDS in distilled water. Do you mean that the formation of dodecanol cannot occur spontaneously in this system? (This mixture is stored for a long time, weeks, in room temperature.) Does it need a certain pH-value?

Dilute, pure soap solutions are a growth medium for bacteria. Unless extreme processing conditions are employed both at the user's end and the soap producer's end, bacterial contamination is inevitable. Soap manufacturers are always plagued with bugs growing in their products and include bacteriostats (chemicals) and careful handling controls in their products. Bacterial hydrolysis of SDS (also known as SLS or sodium lauryl sulate) occurs readily to produce dodecanol and inorganic sulfate. The sulfate can be reduced under anerobic conditions to sulfide. Dodecanol rapidly degrades further to CO2 under aerobic conditions. Signs of bacterial contamination include cloudiness, pressurized containers and odd smells, especially sulfide to which your nose is extremely sensitive.

Abiotic hydrolysis of sulfate would probably require a fairly high pH or a fairly low pH. Unless you have measured the pH and confirmed one of these conditions, abiotic hydrolysis is not likely the culprit.

Look on the back of your hair shampoo sometime. You will see one or several ingredients near the end of the ingredient list that are the biocides (methylisothiazolinone, benzalkonium chloride, potassium sorbate, methylchloroisothiazolinone, BHA, BHT, etc...). These bacteriostats/fungicides/algacides are required for the shampoo 'concentrate' to remain stable on the shelf.