Make sure you don't have bed bugs.
I think only the female gnats bite...
The gnats bites are usually harmless and cause no problems. But it can cause itching and inflammation. Apply a soap soaked in water. Also apply a mild steroid like hydrocortisone on the bite site. If symptoms persist then contact to doctor.