Voltage regulator waste too much energy
You are correct in that the linear regulator appears to be using 17mA at 37V so that is a power of:

Vin * Iregulator
37V * 0.017A = 0.629W


But you need to also consider that the linear regulator that you are using is also dissipating power of:

(Vin - Vout) * Iload
(37V - 5V) * 0.031A = 0.992W


Thus you have a total power loss in the linear regulator of:

0.629W + 0.992W = 1.621W !!!


You really need to be using a switching buck regulator for this job. If you do not want to build such a thing you can find a plethora of ready made modules on web sites the like of Amazon or eBay. They do not cost a lot either.