We can define the mood of a work of literature as the atmosphere or feeling that it invokes. Mood is related very closely to setting, as the surroundings have a big impact on the atmosphere. The quiet, tranquil and peaceful setting created in the first two stanzas of this excellent poem with the "gentle wind" and the "hanging" stars and the poet being alone looking up at the moon seems to therefore create a peaceful and reflective mood, which is of course suitable for the meditations of the poet later on in the poem as he contemplates his position in life. Consider how the first sanza helps to create this mood:
By bent grasses
In a gentle wind
Under straight mast
I’m alone tonight...
The wind could so easily have been "strong" or "violent" which would have changed the mood greatly. However, the first stanza creates an impression of a gentle breeze that softly bends the grass as the poet is left alone with his thoughts by himself, looking at the beauty of nature. This all helps to create the contemplative, peaceful mood that allows the poet to find a link between his current state of "drifting" in the boat and his social standing.