Another quick tip here, for future reference.
I needed to sort the custom posts in a REST API response by a meta value, something like this:
number_of_beds is a field that has been added using Advance Custom Fields.
The problem is the REST API only allows certain core fields to be used for the
orderby param. See my other post on adding REST API orderby custom values for more info. So the question was how to add another.