If you want to paint everything, make some kind of a stand out of some scrap wood, then spray the spinning wheel as you plan. Working with scrap saves you having to mask, and ensures that you don't accidentally spray something you care about.
You can also use some coat hanger wire and do it with the wheel hanging from something, but to do so, you'll need to support both ends of the axle.
The only real issue (discounting cosmetics) is what to do about the rim's braking surface (if you have rim brakes). You can mask it or try to remove the paint after, or live with poor braking and some ugliness until the brake shoes finally wear through down to the rim.
__________________
FB
Chain-L site
An ounce of diagnosis is worth a pound of cure.
Just because I'm tired of arguing, doesn't mean you're right.
“One accurate measurement is worth a thousand expert opinions” - Adm Grace Murray Hopper - USN
WARNING, I'm from New York. Thin skinned people should maintain safe distance.