Well, as you might have noticed (or not), a lot of people on the spectrum are sensitive to one or more sensory stimuli (like loud sound, bright light, certain flavours and smells,). When it happens, it will feel like you are overwhelmed, and in fact, it is.
What happens in the brain?
If you get overloaded, it is caused by the massive stream of information your senses receive. As (most) people with ASD are more likely to notice small details, and thus get more information their brains will not be able to handle that information. If you look at your brain like a crossroad with a policeman trying to control the traffic (filtering the information), it is like people with sensory overloads miss that ‘policeman’ filter. Because they don’t have that filter, they get overwhelmed, add the fact that people with ASD receive much more information, it is clear why it happens.
There is a saying that people on the spectrum are differently wired, and that is correct! For example, the part of the brain that processes sound is on ‘normal’ people structured in layers, where the order of the layers is very important. By people with ASD, The order is different, so they process the inputs differently, resulting in overloads
The only solution is to either minimize the source (e.g. Playing music on a lower volume) or wearing something to minimize the impact (e.g. Wearing sunglasses or earplugs). The latter, however, might make you stand out (especially when you are wearing sunglasses inside or wearing big earmuffs. Standing makes it even harder, as it can cause bullying, and make socializing even harder (as others might think you don’t want to talk to them, while you do).