I don't think theres anything to prevent it happening but we found the techniques by 'happiest baby on the block' really helpful when Lily had it. Lots of tight swaddling and shushing and she would calm down a bit- it was hours and hours of non stop crying with her though, I honestly don't know how I'll cope if it happens this time round with 2 other kiddos at home.
ALSO I was about to drop my son at nursery when I got a phone call from my daughters school telling me she's just puked everywhere in class

Half her class are off with this sickness bug- can't believe it! Just what I need with a 10 day old baby in the house