Self-organization of bubbles (structure formation) and related self-action of the acoustic field is a strongly non-linear phenomenon, which is observed, e.g., in acoustic cavitation and sonochemical reactors. The phenomenon is a manifestation of a two-way field-particle interaction, when the bubbles change their position and sizes due to the Bjerknes and other forces and rectified diffusion, and affect the acoustic properties of the medium, which leads to restructuring of the acoustic field. The models of this phenomenon available in literature are revised, and a model based on the spatio-temporal averaging, which includes the above mentioned effects, is derived. Based on this model, a 3-D pseudospectral code for simulation of bubble self-organization is developed and tested. Simulations show interesting spatio-temporal behavior of the bubbles and the acoustic field, which is initialized as a standing wave but may drastically change its structure due to bubble dynamics (especially near the resonance). Bubble pattern formation is sensitive to many parameters including parameters of the acoustic field, bubble initial size, number density, spatial distribution, and ambient conditions. The effects found in the result of simulations are discussed. [This research is supported by the Grant of the Ministry of Education and Science of the Russian Federation (G34.31.0040).]