Where did the term horse play is fools play originate from?

That exact term doesn't seem to be defined anywhere, but "horse play" probably originated from the way young horses frolic and play-fight. It's just silliness and fun with no constructive purpose. So perhaps it was thought that anything a "fool" engaged in was similar to "horse play" and was frivolous.