Boys begin getting erections long before puberty and even before birth. Ultrasound imaging has documented penile erections in fetuses during the second and third trimesters of pregnancy, and erections continue to occur regularly through infancy, childhood, and adolescence. For most parents encountering this for the first time during a diaper change, the reaction is surprise, but the reality is that erections are a normal, involuntary physiological response that the male body produces from very early in development.
Erections Before Birth
Fetal erections have been observed on ultrasound as early as the second trimester. These are not driven by any kind of sexual response; instead, they reflect the developing nervous system testing out basic reflexes. The same autonomic nerve pathways that control blood flow to the penis later in life are already forming and active in the womb. Case reports in ultrasound medicine have documented this phenomenon clearly enough that it is considered unremarkable by obstetricians who spot it during routine scans.1PubMed Central / Journal of Ultrasound in Medicine. In-utero fetal penile erection
The takeaway here is simple: the hardware for erections is wired and functional well before a baby is born. This is purely a reflex at this stage, comparable to how fetuses practice breathing movements or swallowing amniotic fluid. The body rehearses functions it will use later.
The First Months of Life
After birth, erections continue and actually become more frequent during a little-known hormonal phase called minipuberty. In the first one to six months of life, a baby boy’s brain activates the same hormonal pathway that will later drive full puberty. Testosterone levels rise sharply, peaking around one to three months of age, which stimulates penile and testicular growth.2PubMed Central. Minipuberty of human infancy – A window of opportunity to evaluate hypogonadism and differences of sex development? This postnatal androgen surge is well documented and has been linked to physiological development including measurable penile growth during those early months.3PubMed. Postnatal penile growth concurrent with mini-puberty predicts later sex-typed play behavior: Evidence for neurobehavioral effects of the postnatal androgen surge in typically developing boys
Parents who notice frequent erections during diaper changes in the first few months are seeing a perfectly normal byproduct of this hormonal window. The testosterone levels involved are high enough to be comparable to those found in some adult ranges, though they drop back down after roughly six months and stay low until puberty begins years later. Between minipuberty and the onset of true puberty, boys still get erections regularly, but the hormonal backdrop is quieter. The erections during this interim period are primarily reflex-driven rather than hormone-driven.
How an Erection Actually Works
Understanding why erections happen so early requires knowing that they are, at their core, a plumbing event controlled by the nervous system. The penis contains spongy tissue filled with small blood vessels. When the smooth muscle in that tissue relaxes, blood flows in and the tissue expands. That muscle relaxation is managed by the autonomic nervous system, the same network that controls heartbeat, digestion, and breathing without any conscious effort.
Specifically, the parasympathetic nerves from the lower spinal cord promote erections by triggering smooth muscle relaxation, while the sympathetic nerves work in the opposite direction, keeping the tissue contracted and the penis flaccid.4PubMed. Neural control of erection The key chemical messenger in this process is nitric oxide, which is released by nerve and tissue cells in the penis. Nitric oxide triggers a cascade that relaxes the smooth muscle, allowing blood to fill the spongy chambers.5PubMed Central. The role of nitric oxide in erectile dysfunction: implications for medical therapy Sympathetic signals maintain the default flaccid state, while parasympathetic signals flip the switch toward erection.6PubMed. The role of nitric oxide in penile erection
None of this requires hormones, arousal, or conscious thought. Because erections are fundamentally a vascular reflex governed by the autonomic nervous system, they can happen in anyone whose nerve pathways and blood supply are intact, regardless of age. That is why a fetus, a newborn, a toddler, and a school-age child all experience erections despite having no sexual awareness whatsoever.
Erections During Sleep
One of the most consistent contexts for erections throughout a male’s entire life is sleep. Sleep-related erections, sometimes called nocturnal penile tumescence, occur primarily during the rapid eye movement (REM) phase of sleep. This phenomenon has been recognized for over a century; it was formally acknowledged as early as 1920 as a naturally occurring event in healthy males from infancy to old age.7PubMed Central. Sleep-related erections throughout the ages
These erections are not caused by sexual dreams. During REM sleep, the parasympathetic nervous system becomes more active while the sympathetic system quiets down. Since erections are promoted by parasympathetic activity and suppressed by sympathetic activity, the natural shift in nervous system balance during REM sleep creates conditions where erections occur reflexively. A healthy male of any age typically experiences several erections per night during REM cycles.
Even infants experience sleep-related erections. A case report documented a male infant born slightly premature who experienced erections associated with REM sleep during his first year of life, confirmed through sleep monitoring.8Europe PMC / Journal of Clinical Sleep Medicine. Sleep-related painful erection: the first case in a child That particular case was notable because the erections were painful and caused sleep disruption, which is extremely rare. But it demonstrates that the REM-associated erection pattern is active from the earliest months of life, not something that “switches on” at puberty.
Common Triggers in Childhood
Parents often notice their young sons getting erections in predictable situations that have nothing to do with sexual stimulation. The most common trigger is a full bladder. The parasympathetic nerves that control bladder contraction share the same spinal cord neighborhood as the nerves that promote erections. High bladder volume or pressure can stimulate reflex erections through this shared circuitry.9PubMed Central. Recurring priapism may be a symptom of voiding dysfunction – case report and literature review This is the same reason adult men often wake up with an erection: the combination of REM sleep and a bladder that has been filling for hours.
Other common childhood triggers include:
- Physical friction: Clothing rubbing against the genitals, the vibration of a car seat, or simply sitting in a position that applies light pressure can trigger a reflex erection.
- Bathing: Warm water and the sensation of washing can activate the reflex.
- Temperature changes: Getting undressed for a bath or diaper change exposes skin to temperature shifts that can trigger autonomic responses.
- Needing to urinate: As described above, the bladder-erection nerve overlap means an urgent need to pee often produces an erection in young boys.
All of these triggers work through the same reflex mechanism. The sensory nerves in the pelvic area detect stimulation, send a signal to the spinal cord, and the parasympathetic response produces an erection without any involvement from the brain’s higher centers. A toddler experiencing an erection during bath time is no different, physiologically, from a knee jerking when tapped with a reflex hammer.
What Changes at Puberty
If boys already get erections from infancy, what actually changes when puberty starts? The short answer is frequency, context, and intensity. Before puberty, erections are almost entirely reflexive, triggered by physical stimulation or sleep cycles. Puberty introduces a massive surge of testosterone that does several things at once.
First, the hormonal environment amplifies erectile response. Testosterone sensitizes the entire erectile pathway, so the same triggers that might have produced a brief, partial erection in a seven-year-old now produce more frequent, firmer, and longer-lasting erections. Second, puberty activates new triggers. As the brain matures sexually, psychological stimulation like visual attraction, romantic thoughts, or emotional arousal begins to produce erections through a different pathway that runs from the brain down through the spinal cord, rather than from the genitals up through a local reflex. This is why pubescent boys begin experiencing erections in social situations that had no effect before.
Third, and perhaps most noticeably, erections during puberty often happen at seemingly random times. The surge of circulating testosterone combined with a newly sensitized nervous system means erections can arise with no obvious trigger at all. Boys commonly report getting erections during class, on the school bus, or in other public situations where there is no physical or psychological stimulus they can identify. These unprompted erections tend to become less frequent as the body adjusts to its new hormonal baseline through mid-to-late adolescence.
The erections themselves are also physically different after puberty begins. Penile growth is one of the earlier visible signs of puberty, typically starting between ages nine and fourteen, and the increased size of the erectile tissue means erections become more prominent. Nocturnal erections also tend to become more noticeable, and nocturnal emissions, or “wet dreams,” may begin occurring as the reproductive system comes fully online.
When Erections Might Signal a Medical Concern
In the vast majority of cases, erections at any age in childhood are completely normal and require no medical attention. There are a few exceptions worth knowing about.
Priapism, an erection that lasts for hours and becomes painful, is a medical emergency at any age. While rare in children, it can occur in boys with sickle cell disease, leukemia, or certain medications. If a child has an erection lasting more than four hours, especially if it is painful or the child is distressed, this warrants urgent medical evaluation.
The sleep-related painful erection case mentioned earlier represents another rare but real condition. In that infant, the erections during REM sleep caused repeated awakenings and significant sleep disruption.8Europe PMC / Journal of Clinical Sleep Medicine. Sleep-related painful erection: the first case in a child This condition is exceedingly uncommon but illustrates that pain associated with erections at any age deserves medical attention.
Children with spinal cord conditions like spina bifida may have altered erectile function depending on the level of spinal involvement. In these cases, the nerve pathways that control erections can be disrupted, and the severity of dysfunction tends to correlate with the location and extent of the spinal lesion.10PubMed Central. Sexual dysfunction and infertility in the male spina bifida patient A systematic review found that rates of erectile dysfunction in males with spina bifida ranged widely, from about 12% to 88%, depending on the severity of the condition.11Urology. Sexual Function and Dysfunction in Individuals With Spina Bifida: A Systematic Review For families of children with neurological conditions, discussing sexual development with their care team early on can help set realistic expectations and plan for support as the child grows.
Conversely, the absence of erections in an otherwise healthy boy is not typically a cause for concern during childhood. Because erections often happen during sleep or at moments parents do not observe, a parent who has never noticed one should not assume there is a problem. It is only at puberty, when the hormonal axis is expected to activate fully, that a complete absence of erectile function would raise clinical questions.
Talking to Boys About Their Bodies
One of the less-discussed aspects of this topic is the emotional experience boys have as erections become more frequent and socially noticeable during puberty. Research from puberty education programs has documented substantial anxiety among adolescent boys about erections and other signs of sexual maturation. In qualitative studies, boys have expressed wishes for ways to eliminate erections entirely until adulthood, and have asked pointed questions about why erections happen in response to seeing someone attractive and how to control them.12Frontiers in Reproductive Health. “We tell them it is the ‘fire age:'” gender, puberty education and adolescent boyhood in two Ethiopian contexts
This anxiety is not limited to any one culture. Boys across many settings report embarrassment and confusion about erections that occur at unwanted moments, and nocturnal emissions add another layer of distress when boys do not understand what is happening. The gap between when erections start (before birth) and when boys are typically told about them (at puberty, if at all) means there is often a long period where a normal bodily function goes unexplained.
Age-appropriate conversations can start much earlier than most parents assume. A preschooler who notices an erection during bath time can be told simply that this is something bodies do sometimes, using the same matter-of-fact tone you might use to explain a sneeze. This normalizes the experience long before it becomes loaded with social embarrassment. By the time puberty approaches, a boy who already understands erections as a basic body function is better equipped to handle the increase in frequency and the new psychological triggers without the shame and confusion that catch many adolescents off guard.
Reflex Versus Psychogenic Erections
A distinction that clarifies much of the confusion around childhood erections is the difference between reflex and psychogenic erections. In childhood, virtually all erections are reflexogenic. They originate from local sensory signals in the genital area traveling to the lower spinal cord and back, a loop that does not require input from the brain. This is the same circuit that operates during sleep-related erections and bladder-triggered erections.
Psychogenic erections, by contrast, originate in the brain. Visual images, fantasies, emotional arousal, or even smells and sounds can activate nerve pathways that descend from the brain through the spinal cord to trigger an erection. This pathway becomes functional as the brain matures during puberty, which is why the experience of erections changes so dramatically for adolescent boys. Suddenly, erections are not just a random physical event but are connected to thoughts and feelings in ways that feel new and sometimes overwhelming.
Both pathways continue to operate in adult men. Reflex erections still occur in response to physical touch, and psychogenic erections arise from mental stimulation. The interplay between these two systems is what makes adult erectile function more complex than the simple reflex seen in childhood. The spinal cord integrates both types of input, which is why damage to different levels of the spinal cord can knock out one type of erection while leaving the other intact.4PubMed. Neural control of erection
Voiding Dysfunction and Unexpected Connections
The relationship between bladder function and erections goes deeper than the “full bladder causes morning erections” explanation most people have heard. Because the parasympathetic nerve pathways that control bladder contraction overlap with those that promote erections, problems in one system can show up in the other. In children with voiding dysfunction, where the bladder does not empty properly or the muscles coordinate poorly, recurrent erections can actually be a clinical clue pointing toward the underlying urological issue.9PubMed Central. Recurring priapism may be a symptom of voiding dysfunction – case report and literature review
This is a case where a symptom that seems entirely unrelated to the urinary tract turns out to be diagnostically useful. High bladder pressures, poor coordination between the bladder muscle and the sphincter, and even inflammation in the urethra can all generate parasympathetic signals strong enough to trigger reflex erections. Pediatric urologists are aware of this connection, but it often surprises parents, who would not think to mention frequent erections during a visit about bedwetting or urinary issues. If a young boy is experiencing unusually frequent or prolonged erections alongside any urinary symptoms, it is worth bringing up with the child’s doctor, not because the erections themselves are harmful, but because they may help identify a treatable bladder problem.