you must become progressively acccustomed to this happening to overcome...recognize the feeling before it kicks you out of a dream....it is like the difference between feeling oneself teetering on the edge of a cliff, and already falling. cultivate awareness, and soon you will start feeling early enough to stablilize the dream.

nightshade gives good advice if the dream is slowly fading.

if it is quickly fading try spinning, or falling backwards with your arms spreadeagled.

IMO sometimes fading dreams can be salvaged and made even more vivid, and sometimes it is inevitable that one will wake up in a couple seconds.

it seems one can tell the difference while still in the dream after awhile. most are salvageable.