There is no one universal answer here, it will all vary on individual circumstances and what do you actually hope to achieve. Taking the example you've brought in the question:
One of the most common ideas is "Free Friday", where developers get to
work on anything they want on Friday. Can be R&D, can be different
products in our company, can be creating new products, can be open
source projects, can be long overdue refactors, can be training or
experiments. whatever they want.
This is something that was popularized by google, though at this point it was told and re-told so many times that the version passed around doesn't resemble much of reality anymore. While there were leeway days given for work on other projects, they usually had to be work related, and on top of that many of the google software houses were otherwise working 10h days to begin with. So by the time you got to the "free Friday", you already have did your 40 hours of that given week. This varies from one google cell to another, but as far as I can find from ex-google friends, it was never a bonus day off to do something software dev related, instead it was repaid to the company one way or another.
Similarly most of the companies (as far as I know, first hand or through grapevine) that do 4 days work week usually embrace 10-11h long work days, so you are still doing the same amount of hours but condensed into longer days. Same amount of hours is being worked as with 5 days long week. The rest paid the people adequately less, so if you did work 32 hours, you got paid on that basis, despite being hired for 40 of them, with the "free day" making up for the lower salary.
With that mythology out of the way we can circle back to your original question.
Letting them go free for a day per week will obviously make them
happier, but is it beneficial for the company as well?
I am going to assume that you mean the scenario where employees get paid for the full 40h a week, but are expected to only work 32 of them, with the rest spent on work-related interests.
There is one benefit for the company from such scheme: employee retention and ease of recruitment.
Hiring is expensive, so anything that improves retention is certainly worth considering, though must be carefully considered as 20% of work time is a hefty price to pay. Some may make the argument that then the employees will make up for the lost productivity in the other days but I can't find a single sizeable company who tried that and didn't revert back as soon as the dust settled in. I wouldn't put too much stock in such claims - especially as those are very hard to measure, and I don't think that would be transferable across companies and even teams.
By similar fashion hiring and attracting talent will become easier, as you can dangle in front of them the same salary, but only expect them to work for the 32 hours every week, with the other 8 that they can spend on whatever tickles their fancy. Something worth considering for sure, but again, do your own calculation as that's 20% of salary that you are paying for someone to play around.
If your company is starved for talent and got money to throw around then this may not be a bad option to go with (and that was the case where I've implemented such scheme for a client). And then once you build up the talent pool you can do what google did and dump the scheme altogether.