I agree it sounds more like a bug or food poisoning. Primarly because 5 hours later seems like too long of a delay for that type of problem. However, in the future for a ride that long use sport drink; not water.
OP you did 6 hours straight on a trainer? Talk about mental toughness!