Fainting for unknown reasons???

Es

Last week it was really hot (California) and I fainted at the grocery store. Paramedics took my blood sugar and blood pressure and said everything was good. I went to the doctor afterwards and he said baby and I were both ok, it was maybe because it was a really hot day and it was stuffy in the grocery store. Today I was at work and felt light headed and had to sit down because I felt like I was about to faint again, 20 minutes later I fainted. (And again I felt because the room was really hot and stuffy). I went to the hospital and got discharged after 2 hours. Doctor said the same thing as last time, that baby and I are okay and it was maybe because it was hot. I drink a lot of water so the doctor said it’s not dehydration. Any ideas as to why this keeps happening?