Most toddlers who sing to themselves are simply playing. For one 2-year-old boy, singing was a reliable seizure trigger, and so were reciting and playing with silly or witty language, including puns. Listening to music, by contrast, did not set off his seizures.
The boy's case, described in 1984 in Archives of Neurology by Joel Herskowitz, N. Paul Rosman and the influential behavioral neurologist Norman Geschwind, was billed by its authors as a unique form of reflex epilepsy in childhood. What made it so striking was that the trigger was not a sound he heard but language he produced himself.