In normal English syntax, single-word modifiers precede the noun they modify, but phrases follow the noun.
So you put the -ing word before the noun it modifies when it is acting as an adjective, not as a non-finite verb. You put the -ing word after the noun when it is part of a verbal phrase with other parts in it; you can’t have a long verbal phrase preceding the noun it modifies.
Sometimes the -ing word is actually a noun: a writing desk is a desk for writing, not a desk that happens to be writing. But it is still modifying desk. Here are examples of the -ing word used as a modifier (either as adjective or a noun) preceding the modified noun:
answering machine, barking mad, bleeding heart, bowling alley, burning
bush, burrowing owl, carrying capacity, changing room, chattering classes,
closing credits, coloring book, cooking oil, creeping thyme, dictating
machine, drawing board, drilling rig, eating disorder, fighting drunk,
firing squad, floating bridge, flying fish, flying buttress, flying fox,
flying fuck, growing pains, heating element, holding pen, hopping mad,
killing field, landing gear, laughing gas, lending library, lightning bug,
magnifying glass, mailing list, missing person, moving walkway, opening
night, parking meter, plunging neckline, praying mantis, quaking aspen,
revolving door, rising sun, rounding error, scalding hot, shifting use,
shouting match, starting line, talking point, thinking cap, trading post,
On the other hand, here are pairs of examples where the first one has the -ing word first where it acts as a simple adjectival modifer, and where the second one has it acting as an actual verb:
- the acting director had harsh words for us
- the director acting in the company’s best interests keeps a tight ship
- the binding action of this substance
- the cord binding the two halves together
- the bouncing ball hit me in the face
- the ball bouncing down the stairs was lost forever
- the calling function retains its own private variables
- the woman calling for a new husband will soon enough find one
- the carrying case was very heavy
- the case carrying the lead was heaviest of all
- the circling vultures drifted ever higher
- the vultures circling above our heads would wait until we dropped
- the cooking sausages smelled fabulous
- the women cooking our breakfast made us wash up first
- a demanding teacher is hard on the students
- a teacher demanding full attendance is seldom listened to
- the facing audience recoiled
- the man facing the audience cheered
And so on and so forth. In your case, you could have put sleeping afterwards, and had a man sleeping under the tree, but sleeping men like sleeping dogs are not particularly unusual.
However, you would not normally speak of fishing men, so you would have a man (who was/is) fishing for something down by the river bank. If you strained it, you could build up a context in which fishing men might contrast with farming men or some such, but it would be abnormal.
You might find a man singing in the rain, or you might find a singing man (who is out) in the rain, but you will never find a singing-in-the-rain man. Or to put it more crudely, there is a world of difference between having a fucking idiot in your livingroom and having an idiot fucking in your livingroom.