Welcome to FishLore! It's great to have you with us! Are you sure it's the male that is hiding, or could you possibly have 2 males? They can be quite aggressive toward each other. If you are not familiar with cycling, please go to the articles for beginners sticky in this forum and read up on it along with the other stuff. That will help you a lot keep a healthy and beautiful tank.
If your nitrates are high, a simple water change can help with that. You may also want to check your water straight out of the tap for nitrates in your tap. Live plants also help keep the nitrates down and make your tank look great.
If you mean nitrites, then a water change can also help with that. Please post your ammonia, nitrite, and nitrate levels so we can help you. If your nitrite test is over 1.0, an immediate water change is necessary, and may be the reason your gourami is acting strange. Let us know what your readins are and what type of test you are using (strips or liquid) so we can get you on track!