After (or during) heavy excercise (jogging, working out, etc.) I always start to get very thick, heavy saliva building up in my mouth which I really feel like spitting out. Why does this type of saliva build up, and is it best to spit it out or swallow it (is it kind of waste that your body wants you to spit out, or will spitting it out just dehydrate you more)?
It is because your body is being responsible with the water it has. Saliva is comprised mostly of water and your body uses (loses) a lot of water during exercise. Since you only have so much water available, your body is smart enough to divert water from non-essential functions to handle the functions it is performing. So your body takes water from the digestive system (saliva) to help fuel things like sweat.
Thick saliva forms in your mouth because of evaporation, not because your body shuts off its saliva glands. By taking a quick glance at the makeup of saliva, it's easy to deduce that when saliva condenses (when water evaporates from it), what remains is mucus. The saliva remaining in your mouth during heavy exercise is thick and slimy because it has a higher concentration of mucus.
The reason much of the water in this saliva has evaporated is because your mouth closes much less frequently during heavy exertion (also leading to less sympathetic stimulation) and you respirate much more frequently -- both of these contribute to more rapid evaporation. Standing outside on a cold day will give you an idea of how much water you expel each breath.
Whether or not you spit it out is your choice. Personally, during heavy exertion I only spit if the saliva starts to impede my ability to breathe.
Although spitting is disgusting, it is better to spit out the saliva. As is mentioned above, the saliva is a way for the body to remain constant. (Homeostasis) When you exercise you become very hot because your cells are respiring quicker to produce energy. Sweat is a way for your body to become colder again, this works by water being taken to the surface of your skin then evaporating and taking heat with it. Spit contains a lot of water but also enzymes which would have been used to digest food in the mouth. So it is best, (although a bit disgusting) to spit out the saliva. When exercising you inhale a lot more air at once, this needs to be cleaned before entering your body otherwise you have a risk of infections, therefore, your body produced mucus and saliva to remove the large dust molecules and bacteria. When you exercise your body takes in a lot more air at a quicker pace, so you produce more mucus to help clean it. It is important that you regularly blow your nose/ spit to get rid of the excess and old mucus that is full of bacteria and dust particles from the air. Swallowing your saliva completely goes against the point of your mucus as the dust and bacteria can then enter your body anyway! So make sure that you do not swallow your spit and you blow your nose regularly when exercising. Make sure that you also drink fluid during/after exercise to replace the water levels that have gone. You should be made of about 80% water, so it's important that you drink water to enable all the processes in the body to work properly. Hope this helps!