What I typically do for both terrestrial and aquatic plant flowers...
Enjoy the flowers while they look nice, but as soon as they start to deteriorate, pinch them off. However, I'm not sure about whether or not it would be best to pinch off the stargrass flowers right away to encourage growth.