Many years ago, when I was owned by my first macaw (Pakshi - a Hahns Macaw), I learned an important lesson.
Pakshi had been with me since November and had been a sweet and loving companion. That first spring, however, as the days started getting longer, we had trouble: Pakshi started biting me! I really didn't think I was doing anything to provoke the bites, but they were happening. It seemed like he was nailing me about every other day. At about the same time, my favorite bird fanciers magazine ran an article talking about the necessity of ensuring that birds receive adequate dark/quiet time every night. The article pointed out that especially birds which originate from the tropics or near the equator have not evolved to handle the swings in daylight/darkness. The author of the article proposed that between 10-12 hours of quite and dark are required for these birds to get enough rest - and went on to point out that covering the bird might ensure the dark needed, but not the quiet. A parrot in a covered cage is unlikely to be asleep if the TV is on or there's other activity.
I had a medium-sized budgie cage with a wide flap door that I used primarily for Pakshi's travel carrier. This I installed in my guest bedroom (well away from the family room where I spent evenings) and kept a dark towel to pull over top of it. I started a routine of taking him to his "bed" at about 8 or 8:30 every night.
Did it work? YES! He returned to his usual sweet self in about three days. More, he clearly liked the arrangement, because if I failed to take him to "birdee bedtime" on schedule, he'd screech loudly to complain.
From that time on I've been careful to make sure any birds of equatorial or tropical species in my household had a special bedcage - and when I started keeping large macaws was already wise to the necessity of ensuring adequate rest.
As a result, Laka and George both have special "sleep cages". These are very small cages - adequate to allow them to turn around and sit without being up against the bars - but certainly not anywhere near the size of their day cages.
Here's Georges (below). As you can see, it's quite small, but it's adequate because he doesn't really need to move around much at night. It's fitted with a special "manicuring" perch, which helps keep his toenails from getting too sharp. Because his "room" (the guest bedroom) is on the northeast side of the house, we cover it with a dark sheet to ensure he's able to sleep until 6:30 or so (otherwise, he'd be up and serenading us at 5:30 or even earlier).
And here's Laka's cage. Again - it's far too small as a "residence", but for sleeping purposes, it's perfect. She doesn't need a cover - as her room stays darker in the morning than George's does.
It's funny in a way that they would actually WANT to be taken to these small cages at night - but they do. Laka in particular will head there herself if she's out of her day cage at "bedtime" - and even used to climb the stairs on her own and go straight to "bed". We had to stop allowing her to do that, however, as she didn't actually climb inside the cage (just on top of it), and from there it was too tempting to lean over and gnaw the edges of the bathroom mirror.