tl;dr: Things look profound when you use the wrong mathematical language and name arbitrary expressions in your math with the same words as other scientists use to summarize their observations. Don't waste your time, though.

When I transitioned from physics to biology, I was really interested in this kind of work. All the papers trying to do so, aside from one, did not pan out on closer investigation. That one was a model of branching fluid transport networks that noted that most such networks had the same number of branch levels, and gave an interesting calculation of fluid flow resistance to show that was an optimum. The only optimizing framework that gives you any mileage in a general way in biology is evolutionary game theory.

I spent a few minutes poking around this. The framework is straightforward once you pull all the verbiage off of it.

Consider usual statistical inference in the language of game theory. It's a two player game (nature and the actor making a decision). First nature makes a move (choosing a state of nature), and then the actor makes a move (the decision or inference) given limited information on nature's move. Since nature's move doesn't depend on the actor's move, you can optimize the actor's strategy given nature's strategy without having to worry about Nash equilibria.

This extends the framework to a repeated game. At each stage the actor takes an action and nature takes an action. The actor's move changes what partial information it gets from nature's move. Nature's moves continue not to depend on the actor's move.

Now, in general in inference you need some additional principle to choose from the many strategies that are each optimal in somewhat different ways. Friston assumes that all the actors involved are Bayesian.

Once he's assumed that, he has a well defined framework for optimizing the player's behavior. It turns out that doing these calculations directly is intractable, but the risk he's actually minimizing is bounded by an expression that looks like free energy in statistical mechanics, so he minimizes that instead.

Now, there are some problems there:

1. It assumes that actors are Bayesian. That's not true in general. In the 1960's and 1970's a set of theorems pointed to rational actors being Bayesian, but as the field matured it turned out that the general case wasn't true. It only worked in the very restricted case where it was discovered. It's common that people outside of statistics only know the early excitement and not the later disappointment, though, so this keeps coming up.

2. The framework was developed assuming that the world doesn't act in response to the actor. You could kludge that in, but it's exactly that: a kludge. If you don't have other actors, then you don't really need internal state. You just need a search strategy.

3. The framework is too general. You can extract almost anything you want by putting in the right functions for its various terms.

4. In the papers I looked at this morning, various parts of the math are named with words taken from problem domains, but those words are not operationalized. Without that, there's no reason to think any of this is relevant to reality.

Biology isn't physics. Dragging universal extremum principles in doesn't yield much in biology. (And has probably painted physicists into several corners at this point, too.) If you're interested in neurobiology, go look at actual organisms and their dynamics.