Michael D. Cohen sat silently in a Manhattan courtroom on Tuesday as a judge ran through a list of questions typically asked of defendants before they plead guilty.

Had he been under a doctor’s care? Had he ever been hospitalized for mental illness or addiction?

No, Mr. Cohen replied each time.

But when the judge asked whether he had had any medication or alcohol in the last 24 hours — “What have you taken or consumed, sir?” — Mr. Cohen responded affirmatively.

“Last night at dinner, I had a glass of Glenlivet 12 on the rocks,” Mr. Cohen said, drawing laughs from the spectator gallery. It was not his usual custom to do that, he added.