The 39-year-old tennis the admission after falling to his hands and knees and appearing to vomit during a shock defeat at the Cincinnati Open, with the 24-time Grand Slam champion becoming visibly unwell during his second-round match against Argentina's Thiago AgustÃn Tirante in Mason, Ohio, on Saturday.
Djokovic won the opening set comfortably but struggled as the match progressed in hot and humid conditions, required medical attention and eventually lost 2-6, 6-4, 6-4 in his first competitive appearance since reaching the Wimbledon semi-finals in July.
Speaking to reporters afterwards, Djokovic said: "First and foremost, I congratulate my opponent today. Honestly, it hasn't been a pleasant match for me. That's how I've felt. It hasn't been the first time, and it won't be the last. That's just how it is."
The Serbian fell to his knees during the second set and was subsequently seen with a towel held to his face.
He then sat on his bench, removed his shirt and placed ice on his head while receiving treatment from medical staff.
Djokovic said the weather itself was not responsible for what happened.
"It's because of a health issue I have. I've been dealing with it for many years now. It causes me a lot of problems, especially when there's a lot of humidity and heat," he said.
Djokovic has not publicly identified the condition.
"I did anticipate it (would be humid), but there are all these things, like nerves and everything involved that make it worse, and that's what happened," he said.
The defeat was another setback in Djokovic's increasingly selective schedule as he continues his pursuit of an unprecedented 25th Grand Slam singles title.
Cincinnati was only his third tournament outside the Grand Slams this season. He reached the Australian Open final in February, losing to Carlos Alcaraz before later reaching the Wimbledon semi-finals, where Jannik Sinner defeated him in straight sets.
His latest physical difficulties come shortly before the US Open, which begins in New York on August 30. Djokovic is attempting to add another major title to the record he shares with Margaret Court while competing against a younger generation headed by Carlos and Jannik.