The short answer, it depends per person. Some people go well on sports without taking any carbohydrates, others rely on it. In the latter group, it can be beneficial to take them prior, after or even during the exercise.
Carbohydrates feed the fast energy system in your body. You store glucose as glycogen in your muscles and liver, which can enhance your exercise performance. You can fill this system during the exercise, but also beforehand (dubbed 'carb loading') or afterwards ('carb backloading'). It is best to try them all, and see to what extent they positively affect your performance.
In science, it is know that carbohydrate intake right before, or during long-endurance exercises (shorter than 3 hours) increase stamina and performance, though optimal timing and dose is unclear.
When extending a steady state exercise (so, not interval exercises), endogene glycogen sources and blood sugar are the preferred sources of energy. Tiredness during exercise, often correlates with the depletion of endogene energy sources and dysregulation of blood sugar levels. Carbohydrate intake (during, but presumable also right before the exercise) will increase performance and endurance, primarily due to keeping the blood glucose on the right levels, and the uptake of energy from exogenous sources.
Since these processes all happen at the same time, it is important to fine tune and time the dose. Therefore, when looking in your blood glucose data, it is possible to see a peak at the end of the exercise.