Maybe he’s so unused to it that the first time it happened he thought it was a mistake. After all Bones was tired/wasn’t feeling great so surely he hadn’t meant to call Jim “sweetheart” after he helped the good doctor into bed. He wasn’t thinking clearly and “thanks, sweetheart.” was just a slip of the tongue.
That didn’t mean it didn’t feel nice though. So Jim didn’t say anything because he didn’t want to make things weird between him and Bones, and more selfishly because he hoped he might get another endearment later.
The second time maybe Jim thought he was hearing things, because he was the exhausted one this time. So surely he misheard as Boned tucked him into bed with soft “G’night, darlin’. Get some rest.”
And maybe it’s just time after time like this where maybe Bones didn’t really mean it, or maybe Jim wasn’t hearing him right. Till finally one day Jim works up the nerve to ask about it. Sort of, in a roundabout way. And he greets Bones with a cheerful “Hey, babe!” Just to see his reaction. And Bones doesn’t miss a beat before slinging an arm over Jim shoulders in a sloppy half hug and a “Hey, sunshine.”
And Jim can’t stop grinning from ear to ear for a while after that. And it’s not something they ever really discuss, but it just becomes a thing that when they’re alone (or at least off duty) they greet each other by some pet name, and whether or not they’re staying the night together, they use an endearment to say goodnight.
And sure, it’s nice when Chapel calls him “dear” as she does with many patients, or when Uhura or Gaila call him “love” at the end of a hard day. But it never quite has the same feeling as the numerous and sometimes ridiculous nicknames Bones can up for him. Maybe it’s because Bones has been doing it the longest, or… he’s not sure, but there’s that saying about not looking a gift horse in the mouth so he doesn’t care to question it too much. He’ll just grin, and take a hug, and accept Bones’s “Mornin’, doll.”
Headcanon: very few people have ever been soft with Jim Kirk. He makes friends, eventually, but even they tend to see him as strong and captainly and that comes with boundaries.
So he just drinks it in every time Len calls him sugar or darlin’. He craves the gentle nature of it.