Q:

Can you keep flying after being Restrained?

If a character with flying is restrained, can he keep flying?
Example: some angel is 40ft. in the air. The ranger fires an Ensnaring Strike, which lands on the angel. Can the angel remain 40ft. up in the air?
Ensnaring Strike mentions:

The next time you hit a creature with a weapon attack (...), the target must succeed on a Strength saving throw or be restrained by the magical vines until the spell ends.

The restrained condition mentions:

A restrained creature’s speed becomes 0, and it can’t benefit from any bonus to its speed.
Attack rolls against the creature have advantage, and the creature’s attack rolls have disadvantage.
The creature has disadvantage on Dexterity saving throws.

Is flying considered a speed bonus? Do you expend speed to keep flying?

A:

In the 5e Monster Manual, you will notice that some creatures, like air elementals, have the (Hover) attribute. Hover allows a creature to remain in the air while it has a speed of 0.
Additionally, as stated in the PHB pg.191: 

If a flying creature is knocked prone, has its speed reduced to 0, or is otherwise deprived of the ability to move, the creature falls, unless it has the ability to hover or is being held aloft by magic, such as the fly spell

Thanks to Protonflux for finding this citation
If a monster does not have the hover attribute, it will fall if its speed is reduced to 0 while it is flying under its own power.
Note that a creature without hover doesn't actually have to move on its turn to remain in the air. It just needs to have a speed greater than 0.

A:

You don't fall when it is magic that is holding you aloft. You fall if it is your wings, or equivalent, that stop working.
PHB 191:

If a flying creature is knocked prone, has its speed reduced to 0, or is otherwise deprived of the ability to move, the creature falls, unless it has the ability to hover or is being held aloft by magic, such as the fly spell

