How long must a refrigerator be left upright after being leaned at an angle before operation?
It's not clear what MAKE/MODEL you have but the GE Appliance manual says to leave it UPRIGHT for an amount of time equal to the length of time it was on its side.

It also says specifically:


  If laying on its side just briefly to service, clean or adjust, just a few minutes of stand time will be enough.


It sounds as though just a few minutes will be sufficient.

From the OP:  An experienced friend recommended 8 hours after 5 minutes of it being between flat and 45 degrees (while moving it).