Your guy made a bubblenest. They build them for breeding. After the female drops the eggs, the male picks them up and carries them to the nest to hatch. I personally believe they usually make them because they are content, but you will hear several different views on them. I have read here that bettas tend to build them more when there is a chance of rain. I have two boys that will bubblenest almost everytime before a rain. I have another that bubblenests almost every day and my fourth one has never made a bubblenest.