My family has been both, in the tiny tourist town where I grew up. Not from a change in household income really; but tourist towns tend to have the dynamic of a Third World country. There's a few insanely rich people, a lot of desperately poor people, and a tiny middle class. My parents run their household as frugal but upper middle class people. In my school district, the children in rich families go to private school; most of the middle class ones are in the public school.
Therefore, my family was the "poor" family in a nicer neighborhood- others had bigger houses and luxury cars; my family lived in an older, more modest house and my parents bought American-branded cars for cash. Mom saw a herd immunity in the neighborhood's safety: if someone wanted to rob a house, ours had far less stuff of interest.
At school, my family was considered "rich" in relation to the others (since, again, the rich kids went to private school). Lots of kids there on free lunches and whose parents didn't have much education. I was from the nicer side of the tracks (and yes, there were actually railroad tracks) and I caught hell for it- mainly because I didn't put much thought into the class differences. I didn't care about designer clothes because I had nothing to prove. Going to college was a given, I planned to make something of myself, so who gives a rat's rear end about the high school stuff anyway? Many of my friends were still from poor families, but other schoolmates were rather nasty. It's not like I was holding myself above anyone!
To my schoolmates who lived in trailers, my family was rich. To my immediate neighbors, my family seemed poor. I recall Milton's line about "Better to reign in Hell, than serve in Heaven." I disagree. The least-wealthy families in a rich area meet mostly indifference. On the reverse? You get outright hostility. Besides, a lot of people with the fancy cars are just putting up a front. I'll take my paid-off Subaru over a leased Lexus any day of the week.
So I was able to walk to the beach after school. Yes, that was great! The crime rate was very low; it was a very safe town, but the school district had all the social pathologies of the inner city. Really, I kinda wish I'd grown up in the 'burbs in a school district that offered AP classes.