Bubblenesting is an instinct. It is not a sign of happiness or contentment or anything of the sort. Some bettas do it more than others, and if your water is too hard or if there is nothing for the bubbles to stick to, the bubbles may pop before the nest can fully form. There are a couple of things you can do to encourage nesting such as add indian almond leaves (available on e-bay), adding dried oak leaves (sterilized by boiling in water before adding to the aquarium), or simply floating an object on the surface such as the leaves I just mentioned, or a piece of styrofoarm, or you could cut the center out of a paper plate.
Some people think that bettas also tend to nest in response to changes in barometric pressure that signal the approach of a storm. I don't think studies on this subject were conclusive, but I do notice that they nest more when the air between the water and the hood is allowed to get very humid.