Other times, the items will not stack for non-obvious reasons. Some ways around this is to pick up all the items in question and then drop them again – did they merge into a single pile that time?
Sometimes leaving all the items in a pile on (for instance) the floor of your apartment can help the stack to merge. This may take a while though. While such an issue can be annoying, the items in question are all valid items and not something that requires immediate DM intervention to resolve or investigate.