Structural plasticity, characterized by the formation and elimination of synapses, plays a big role in learning and long-term memory formation in the brain. The majority of the synapses in the neocortex occur between the axonal boutons and dendritic spines. Therefore, understanding the dynamics of the dendritic spine growth and elimination can provide key insights to the mechanisms of structural plasticity. In addition to learning and memory formation, the connectivity of neural networks affects cognition, perception, and behavior. Unsurprisingly, psychiatric and neurological disorders such as schizophrenia and autism are accompanied by pathological alterations in spine morphology and synapse numbers. Hence, it is vital to develop a model to understand the mechanisms governing dendritic spine dynamics throughout the lifetime. Here, we applied the density dependent Ricker population model to investigate the feasibility of ecological population concepts and mathematical foundations in spine dynamics. The model includes “immigration,” which is based on the filopodia type transient spines, and we show how this effect can potentially stabilize the spine population theoretically. For the long-term dynamics we employed a time dependent carrying capacity based on the brain's metabolic energy allocation. The results show that the mathematical model can explain the spine density fluctuations in the short-term and also account for the long term trends in the developing brain during synaptogenesis and pruning.