In the core Pokémon games, flying itself does not reduce a Pokémon's happiness; what commonly makes a flying Pokémon less happy is being fainted, because the Fly move takes the user off the field for one turn and an opponent can knock it out while it is airborne. Happiness (now usually called friendship) is a hidden stat that changes mainly through battling events, walking, vitamins, berries, grooming, and being kept in the party—not through the act of using a Flying-type move.
The question hides two different ideas under "flying": using the move Fly, and simply being a Flying-type or otherwise traveling by air. Those are separate mechanics with separate effects, and neither has a built-in happiness penalty. The precise answer also depends on which generation and which game you mean, because friendship mechanics and the Fly move's behavior have changed across editions. Where a game-specific rule differs, it is flagged below.
Why "flying makes Pokémon less happy" is a persistent impression
The short answer is that the rumored penalty does not exist as a general rule, but several real mechanics can make it look true in ordinary play.
The move Fly is a two-turn attack: on the first turn the user goes high into the air (semi-invulnerable), and on the second turn it strikes. During that airborne turn the Pokémon can still be hit by moves that reach it—Thunder, Hurricane, Gust, Twister, Sky Uppercut in older games, Smack Down in later games, and others. If the Pokémon faints from such a hit, or from a hit on the turn it lands, it loses friendship. A player who repeatedly uses Fly, watches the bird get knocked out mid-air, and then notices the friendship meter dropping may reasonably conclude that flying is the cause. The cause is the faint, not the flight.
A second source of confusion is that friendship is invisible in most games. Players infer it from behavior—whether a Pokémon obeys, whether it survives a hit at 1 HP through affection in later titles, whether a friendship-evolution triggers. When they see a change after a battle in which Fly was used, they attribute the change to the most memorable event. That is a reasonable inference and a wrong one.
A third source is the difference between friendship and affection in games from X and Y onward. Affection (raised by Pokémon-Amie and later by camping and picnics) affects battle perks such as surviving at 1 HP and landing extra critical hits. Friendship (raised by walking, leveling, vitamins, grooming, and berries) drives friendship evolutions and moves like Return and Frustration. Flying affects neither by itself. A player who conflates the two may misread which stat moved.
A fourth source is Flying-type weakness to common moves. A Flying-type brought into a battle against an Electric- or Ice-type attacker faints more often, and fainting costs friendship. The type matchup is the mechanism, not the act of flying.
What actually raises and lowers friendship
The reliable levers are consistent enough across generations to describe in general terms, but the exact amounts and caps differ by game. The following describes the patterns rather than guaranteeing a specific number for a specific title.
Fainting lowers friendship. This is the big one for the Fly question. Each time a Pokémon faints, its friendship drops. The penalty typically applies wherever the faint happens—in the wild, in a trainer battle, in a gym—though some games handle scripted or story faints differently. A freshly caught Pokémon that faints repeatedly will stay at low friendship, which delays friendship evolutions and weakens Return.
Walking with a Pokémon raises friendship. In games with a walking partner (HeartGold and SoulSilver, Let's Go, Sword and Shield's camping, Scarlet and Violet's picnics and Let's Go walking), simply having the Pokémon out and moving builds friendship. In older games, walking a certain number of steps with the Pokémon in the party also contributes. This is the main reason a Flying-type that never faints tends to become friendlier over time despite flying constantly.
Leveling up raises friendship, especially for Pokémon that evolve by friendship, and vitamins (HP Up, Protein, and so on) raise it too, though with a cap per vitamin type in some generations.
Grooming and minigames raise friendship—the haircut brothers in Gold and Silver and their remakes, the massage in later games, Pokémon-Amie and its successors for affection, and similar systems.
Berries can raise or lower friendship. The Pomeg, Kelpsy, Qualot, Hondew, Grepa, and Tamato berries lower friendship in some games because they reduce effort values, which is a deliberate trade-off. The Salac, Petaya, and similar pinch berries raise friendship in some titles when used. This is edition-specific and easy to get wrong, so check the berry's description in the game you are playing.
Holding a Soothe Bell raises friendship gains. An item, not a Flying-type effect.
Trading resets friendship. A traded Pokémon starts at a low friendship value (often near zero for the new trainer, with the exact baseline varying), which is why traded Pokémon disobey until you build friendship or earn enough badges.
Certain moves and abilities interact with friendship (Return and Frustration scale with it; some abilities or natures affect it in specific games), but Fly is not one of them.
None of these depends on the Pokémon's type or on the act of flying. A Pidgeot and a Rattata that experience the same events gain or lose friendship the same way, apart from the Pidgeot's greater likelihood of fainting to Electric and Ice attacks.
The Fly move specifically
Fly's mechanics do not touch friendship. Using it does not cost friendship, and landing it does not grant friendship. What Fly does is create a window in which the user is semi-invulnerable but still hittable by a defined set of moves, and that window is a risk. The risk is real: a Flying-type with a 4× weakness to Ice or a 2× weakness to Electric is more likely to be knocked out by a well-aimed hit, and the faint costs friendship.
Two related moves behave similarly. Bounce is a two-turn Flying-type move with a paralysis chance, and Sky Drop lifts the target for a turn in some generations (with a long list of exceptions and interactions). Neither has a friendship effect. Sky Attack is a two-turn move that charges and then strikes, without the semi-invulnerable airborne turn in the same way; it also has no friendship effect. The pattern is consistent: two-turn moves are risky because they give the opponent a free turn or a window to hit, and risk translates into faints, and faints cost friendship. The move is not the cause.
There is also a category confusion worth naming. "Flying" can mean the Flying type, the Fly move, the act of traveling by air (in games with a flying taxi or Soar mechanic), or the semi-invulnerable state. Only the faint outcome matters for friendship, and it matters regardless of which of these is involved.
Generation and edition differences that matter
Friendship has existed since Gold and Silver, when the stat was introduced to drive the new friendship evolutions (Eevee into Espeon or Umbreon, Golbat into Crobat, and others). In Red, Blue, and Yellow, friendship did not exist as a mechanic, so the question "does flying make Pokémon less happy" has no answer in those games—there is no happiness stat to reduce. That is an important ambiguity: if someone is asking about Gen I, the premise is empty.
In Gold, Silver, and Crystal and their remakes, walking and grooming are the main friendship levers, and the haircut brothers are a reliable way to raise it. The Fly move exists and behaves as a two-turn move.
From Ruby and Sapphire onward, abilities and natures were added, and friendship continued to work much as before. The introduction of Return and Frustration in Gold and Silver made friendship mechanically visible in battle, which is part of why players track it.
In X and Y, affection was split off from friendship via Pokémon-Amie. Affection is a separate stat with separate effects (battle perks), and flying does not affect it either.
In Sword and Shield, camping and cooking curry raise friendship, and the move Fly is still a two-turn move. In Scarlet and Violet, picnics and washing raise friendship, and Fly is available as a TM or move depending on the game's move list. The pattern holds.
The exact friendship values, caps, and per-event amounts vary by game, and the precise list of moves that can hit a Pokémon using Fly varies by generation (for example, Smack Down was introduced in Generation V, and Sky Uppercut's ability to hit airborne targets has been consistent but is edition-checked). None of these variations creates a flying penalty.
What to check if your Pokémon's friendship seems to drop after flying
If you are troubleshooting in a specific game, the productive checks are:
1: Did the Pokémon faint? Check the battle log. A faint is the usual cause of a friendship drop, and it can happen on the airborne turn. 2: Did you use a friendship-lowering berry? The EV-reducing berries lower friendship in many games. 3: Did you trade it? A traded Pokémon's friendship resets to a low baseline. 4: Are you confusing affection with friendship? In games from X and Y onward these are separate stats with separate UIs. 5: Is the game one where friendship exists at all? Gen I has no friendship stat.
If none of these apply, the drop is probably not happening; friendship is hidden and players often misread its direction, especially when a friendship evolution is close and the meter is near a threshold.
The bottom line, stated plainly
Flying does not make Pokémon less happy. Using Fly does not cost friendship. Being a Flying-type does not cost friendship. What costs friendship is fainting, and Fly's semi-invulnerable turn creates a window in which a Flying-type can be knocked out by a super-effective move—so the risk associated with Fly can indirectly lead to friendship loss, but the mechanism is the faint, not the flight. Walking, leveling, grooming, vitamins, and the Soothe Bell raise friendship regardless of type. The question's premise is a reasonable inference from watching battles, but it is not a rule in any main-series game.
If you are playing a specific title and want to know the exact friendship values or the full list of moves that can hit a Pokémon during Fly, the in-game move description and the game's own help text are the reliable sources for that edition; the general principle above holds across the main series, but the numbers and exceptions are edition-specific and should be checked in the game you are actually playing.