There is no one signature story about Mantle or Dimaggio’s dealings with kids seeking autographs. It’s quite possible that the OP has read or heard an interesting good/bad anecdote about how one of those men treated autograph seekers, but there is no one legend that’s widely told about either.
Certainly nothing as famous as the (not entirely bogus) legend of Babe Ruth hitting a home run for a dying boy in the hospital!
For what it’s worth, neither Mantle nor Dimaggio was an admirable person in private life. Each could be a real jerk, though in completely different ways. Dimaggio was a cold, mean, money-grubbing, paranoid, heartless prick without a true friend in the world- but he knew he was perceived as the embodiment of class, and went out of his way to maintain that image. He didn’t much like kids (and was a bastard to his own son, Joe Jr.), but often said he always had to be at his best, because “Some kid might be seeing me for the first time today.” He didn’t like signing autographs (except when paid hefty fees to sign merchandise), but usually did so graciously because he was so aware that his wholesome, perfect image required it.
Mantle projected a happy-go-lucky, good ol’ boy image, but was a major drinker with a mean streak. I never met him, but my older male relatives in New York (who’d grown up loving him) told me some horror stories about how he’d rebuff kids seeking autographs in gross, obscene terms, while keeping his patented country boy grin on his face.