All three of these factors create suction in the tree. This causes water from the soil to be drawn up into the roots and travel up through the sapwood. When temperatures rise above freezing the next day, sap flow begins again. Once temperatures no longer fluctuate between freezing at night and thawing during the day, sap stops flowing. Genetics and the environment both affect sap sweetness.
Some trees have one or more genes that cause sweeter sap.
Environmental factors including weather, the site on which the tree is growing, and whether the tree is growing in the open or surrounded by other trees all affect sap sweetness. We do not know the answer to this question. We plan to undertake a small research project to answer this question in the near future. You may want to try your own experiment to answer this question. Sap sweetness has been observed to be lower in years following a growing season when conditions were unfavorable for production of sugar through photosynthesis.