The bubbles are indeed nitrogen gas. It is the result of critters from your sand bed eating waste/food from the top of the sand and then expelling waste beneath the sand. The anaerobic area beneath the sand results in the nitrate being converted to nitrogen gas. When the bubbles travel up and...