I put this into a cronjob (for root) with crontab -e:
0-59/5 * * * * /usr/sbin/apachectl graceful
Note: This is probably only suitable for development web servers, since it will disrupt access to the server during the graceful restart...
[robg adds: I don't know enough about OS X's memory management to determine whether this action is really necessary or not. But I do know that the httpd processes can take a fair chunk of real memory, especially as you ask them to do more complicated things. Hence, here's a way to recapture that RAM ... I'll leave it to the comments to discuss the merits of doing so!]

