Original: Their fossils occur in beds which were deposited in both freshwater and marine environments.
Simplified: Their fossils occur in beds of both freshwater and marine environments.