Ketones.
When you work out intensely for long enough, you burn all your glycogen (sugar) reserves, so your body starts to burn fat instead.
When burning fat, one of the byproduct is ketones, and it gives you this weird taste in your mouth.
This phenomena can also happen if you are diabetic and low on sugar, or if you follow a keto diet.
Latest Answers