The president was unexpectedly taken to the Walter Reed Medical Centre on Saturday in a visit that was not listed on his official engagements and which came just nine months after his annual physical.
His press secretary, Stephanie Grisham, insisted the president had wanted to take advantage of a "free weekend" to make an early start on his physical since he was "anticipating a very busy 2020".
The medical visit sparked speculation, including that Mr Trump had been suffering chest pains.
Speaking at a cabinet meeting in the White House on Tuesday morning, Mr Trump lashed out at the media for apparently panicking his wife Melania.
He said: "I went for a physical. I came back, and my wife said, 'Darling, are you OK? ... They are reporting you may have had a heart attack.'
"I said why did I have a heart attack? 'Because you went to Walter Reed Medical Centre.' That's where we go when we get the physical. I said I was only there for a very short period of time."
He added: "I had a very routine physical, visited the family of a young soldier who was very badly injured. He was in the operating room. I toured the hospital for a little while. I was out of there very quickly and got back home.
"And I get greeted with the news that, 'We understand you had a heart attack.' I was called by our people in public relations: 'Sir, are you OK?' I said OK for what? 'The word is you had a heart attack. CNN said you may have had a heart attack. You had massive chest pains. You went to the hospital.'
"These people are sick. They are sick. The press really in this country is dangerous. We don't have freedom of the press in this country. We have the opposite. We have a very corrupt media. And I hope they can get their act straightened out. Because it's very, very bad and very, very dangerous."