The problem with red wine is it isn't just the wine. I can find a great wine sometimes, in a restaurant. One that I could just drink all night, and has a lovely taste. Absolutely joyous. I make a note of it. Buy a bottle for home and it doesn't taste the same. Either the temperature is wrong, or it hasn't been left to breathe enough, or left too long etc.
I now I am going to start sounding rather pretentious (I welcome any mocking), but this is right, wine does change under various conditions as you say. It is a living thing that reacts to all manner of environmental changes. I think, as with your example, there is also the psychological effect of having a nice bottle of wine with good company and good food in a nice restaurant, everything looks and tastes better! You buy the same bottle at home where everything is different and suddenly the wine doesn't seem so good.
Temperature is a big thing, red generally gets served far too warm and white far too cold. Always exceptions but most whites seem to best around 10-12 degrees (bearing in mind most people will serve them fridge cold at about 4-5 degrees) and most reds around 16-18 degrees. Giving reds some air definitely helps most of the time (unless it is very old in which case it won't make any difference), but I find people who say they left it for 10 hours and it suddenly became amazing slightly fanciful. I think if it hasn't improved after an hour or two then in general it's not going to.