You can lower the pipes to about the same level as the grow beds. Add enough piping between the pipes and the grow beds so that when the grow bed fills and empties so does the pipe. The grow bed may act as your filter. Ideally, you want the water to come in from a "middle level" from the grow bed to the pipe so that any "stuff" can settle at the bottom and the energy the water has is ONLY the potential energy from gravity. That means it won't pick up any (hopefully) solids and just leave them in the grow bed.

I would also join the space between the 2 grow beds to make 1 larger one.

A picture is worth 1000 words; so, if that doesn't make sense I can expand on it or try to draw a caveman picture for you in MS paint.