I think it has to do with narrative continuity between verses. The basic idea is that on first mention of the birth of a new character, the prepositional phrase "to Jacob" is elevated to the position immediately following the verb in order to "front" the connection with the prior narrative and delay mention of the new character in the narrative — the son.
The explanation:
First note that all of the clauses under discussion are of the narrative type, driven by the wayyiqtol verbs. The basic purpose of such clauses is to move a past narrative sequence forward. The "neutral" word order is V-S-O.1,2 Many of the clauses we are discussing are without explicit subject, so V-O. Additionally, our clauses have indirect objects, with the default word order V-(S)-O-IO.3 Deviations from this should be explained.
Verse 30:5 follows the narrative about Jacob, Rachel, and Leah. The verse is structured in way that re-names Jacob (here IO) in the all-important primary post-verbal position prior to introducing a new character: Dan, the grammatical object (O). So we have in 30:5b:
וַתֵּ֥לֶד לְיַעֲקֹ֖ב בֵּֽן
and-she-bore to-Jacob a-son
V, IO, O
This deviates from the expected V-O-IO because the phrase "to Jacob" (IO) is elevated in the clause to provide the connection to the prior narrative. The mention of Dan ("a son") is delayed so that:
the intrusiveness of this new character is lessened.2
Dan's naming is discussed in the following verse. In 30:7, Dan is already known, and we revert to the "neutral" order:
וַתֵּ֕לֶד בִּלְהָ֖ה שִׁפְחַ֣ת רָחֵ֑ל בֵּ֥ן שֵׁנִ֖י לְיַעֲקֹֽב
and-she-bore Bilhah servant-of Rachel a-son second to-Jacob
V, S (+app), O (+adj), IO4
The pattern is repeated in vv. 17-19. Jacob is, of course, well known in the narrative and also the grammatical subject of the preceding verse. Now with Leah as the implicit subject:
וַתַּ֛הַר וַתֵּ֥לֶד לְיַעֲקֹ֖ב בֵּ֥ן חֲמִישִֽׁי
and-she-bore to-Jacob a-son
V, IO, O
This places Jacob (IO) in the immediate post verbal position to maintain continuity, demoting the new character to the final position, in violation of the "neutral" word order and in the service of narrative continuity. Verse 18 proceeds to discuss the naming of Issachar. Verse 19 reverts to the more "normal" V-O-IO order for the clause of interest.
וַתֵּ֥לֶד בֵּן־ שִׁשִּׁ֖י לְּיַעֲקֹֽב
and-she-bore a-son sixth to-Jacob
V, O (adj), IO
1. Abbreviations: V = verb; S = subject; IO = indirect object; O = (direct) object; app = appositional element; adj = adjecive
2. Barry L. Bandstra Word Order and Emphasis in Biblical Hebrew Narrative: Syntactic Observations on Genesis 22 from a Discourse Perspective. Linguistics and Biblical Hebrew, Ed. Walter Ray Bodline. Eisenbrauns, 1992.
3. This latter ordering is intended to be specific to the examples of interest. We are dealing with the verb ילד = (of women) "to bear". It requires a direct object, i.e. a complement ("a son"). The indirect object ("to Jacob") is an adjunct. It provide additional information but not necessary to complete the semantics of the verb. All else being equal, the complement should precede the adjunct. [ref needed]
4. Here again the position immediately after the verb includes reference to the the subject of the prior verse, Rachel, by framing Bilhah in relationship to her (grammatically as an appositional modifier - app). This again serves the continuity of the narrative.