For lack of tangible proof of "rules" of naming (at least so far), I am going to resort to examples to try to answer this question:
Case 1: The bastard is female, and marries a nobleman.
The female takes the man's name (if she chooses) and so the children take the man's name.
(currently seeking an example of this, closest case is Raynald Westerling
promised wedding to a Lannister bastard, however the marriage didn't occur because, well Raynald died.)
Case 2: The bastard is male, and marries a highborn woman.
The children take the father's name, which would be the regional bastard name.
This can be illustrated by the case of Walder Rivers, who married a Charlton noblewoman - his children Aemon and Walda both remained Rivers.
Despite keeping the bastard name, they may be intent on maintaining reminders of their noble status - for instance, Walder Rivers has his own variation of the Frey coat of arms.
Case 3: A noble bastard marries a lowborn.
Now if a noble's bastard marries a non-noble, their children still have bastard names even though technically they aren't bastards. The inheritance of the bastard name is an indication that they are both of noble lineage, but not in line to inherit in any way.
This is the case with Aemon Rivers.
In cases 2 and 3, the legitimate children may choose to alter their surname to reflect their legitimate status.
For example, House Longwaters is descended from Jon Waters, a Targaryen bastard. Jon Waters' legitimate son changed his surname from the inherited bastard name Waters to Longwaters.
Case 4: Lowborn bastard marries a lowborn.
Generally, lowborn folk don't even bother with surnames.
For example, Ser Duncan the Tall doesn't even know his own name (although his example is a bit extreme).
But some don't bother, because it doesn't mean anything anyway, so either they take a name of their choosing or not.
P.S.: All the bastards in question here are have obviously not been legitimized.