The objective to evaluate the effects of magnesium supplementation in the water of Japanese quails (Coturnix coturnix japonica) on physiological variables and egg quality with the birds kept in a thermoneutral environment and under thermal stress. Three hundred ninety-four (394) quails were used, distributed in a completely randomized 2×4 factorial design (2 temperatures: 24 and 32ºC, and 4 levels of magnesium: 50, 150, 250 and 350 mg L-1), with six replicates and eight birds per experimental unit. The respiratory rate (P<.0001), head temperature (P<.0001), wing temperature (P<.0001), foot temperature (P<.0001), back temperature (P<.0001), body surface temperature (P<.0001) and average body temperature (P<.0001) showed significant differences between the temperatures tested. With the exception of head temperature (P=0.0045), the other variables did not change their values with the increase in the level of magnesium in the water. Egg mass showed a significant difference (P=0.0072) as a function of the level of mannesium in the water. The temperature of the head was higher in birds consuming water with higher levels of magnesium, causing an increase in respiratory rate, and head, wing, foot, back, average surface and body temperatures in birds under thermal stress.