This is only a partial answer, but I think you might be correct in your assumption that there is a connection between the two words, despite the kanji being different. There are many homophones in Japanese and this means that there are often instances of coincidental phonetic equivalences. But in the case of your question, there could be a connection.
There is an interesting article here which compares the words ささやく, つぶやく, and ぼやく. The article argues that the words were formed by using a giseigo root (onomatopoeic words) with the suffix やく (meaning 'to produce that state'). For つぶやく, the article lists two etymological possibilities: that つぶつぶ provides the meaning of 'detailed', or that 粒 provides the meaning of 'grains/small lumps'. This semantic overlap produces the meaning of 'speak in a detailed manner' [according to the article]. In other words, (1) the つぶ in つぶやく derives from the giseigo word つぶつぶ, which itself derives from the noun 粒. Or (2) that it derives directly from 粒.
While the above article suggests that the phonetic equivalence of つぶ and つぶ(やく) is not coincidental, I don't know why the kanji 呟 was assigned to つぶやく. Perhaps another user can provide more detailed etymological information on that character. My speculation is that when the word つぶやく became established in the language, the connection to the original meaning of 'grain' became obscure, leading to it being assigned its own kanji for clarity. Again, that is speculation.