I recently painted a set of floating shelves from Ikea. I was definitely being lazy, but I didn’t want to deal with painting one side at a time while waiting for it to dry.
So for a quick hack I built myself a little mounting platform like below. I just cut a strip of wood a little less thick than the shelf and screwed it and the bracket to a ‘base’
This let me slide the shelf onto the mount vertically and then I could paint all sides of the shelf in one go. This made the whole process pretty easy!