Birds don't normally like to lay eggs unless they are comfortable and have a place to lay... of course then there are some birds who lay whether or not they have a nest or mate. I've heard of some birds who lay when they have an overabundance of calcium, and buy laying eggs they reduce the amount of calcium in their bodies to a more leveled amount. I've also noticed birds laying eggs under stress...
One bird of mine to lay eggs was Casey, and only because she and Noel had a "nest", which was more or less so an upturned box that Noel liked sleeping in.... And well we all know how tiels and dark cozy spots are!!!

Resolved by removing the cardboard box.
There were also an older pair of bourkes who laid eggs not long after moving to a new home (and of course back then I can't say I was as knowledgeable but I had read lots and was reading even more afterwards). I more or less so caught them in the action of doing the deed and gave them a nestbox.... It wasn't until their second clutch of eggs they had any chicks at all... of course this also brought the daughter into the hormonal stages so I had moved her to a separate cage to prevent breeding with her father. And most recently, for unknown reasons that I can find, and no male bourkes around, the only daughter then, started laying eggs. This was resolved by moving her and her little sister to a smaller cage.
I can't really say any of the birds so far mentioned have laid eggs due to stress.... But then we have the tiel family, one of the tiels of which was a chronic egg layer, with her eggs being destroyed due to a grate and probably laying off of a perch??? Resolved once the tiel family was moved into a new home (mine?) and only 1 egg was laid here... In previous home however, they (4 tiels) were stuck in a ferret cage (looks like a bird cage actually... 'bout 4' tall, less than 2' wide/length) and there was constant heavy smoking around them. In this case, I'd say egg laying would be due to stress.
Then there was Tom... in a small cage, which was upgraded to a house style cage.... Constantly smoked around, only fed seeds when someone remembered to give her more or change her water.... had a cover kept over her a lot of the time to keep her quiet... Then slowly starved to death, as she became a chronic egg layer, and her eggs were being removed.... for who knows what reasons... This issue was resolved when I took her in as a foster, fed her (the lowest I weighed her in at was 58 grams!

), gave her calcium supplement, and put her in a larger cage (the so called ferret cage, good for 1 tiel!). No issues sense!
I also knew of a lovebird under similar circumstances as to what Tom went through, although I doubt she was treated as badly since she was fed, and I can't recall a cover going on her cage unless it was at night maybe??? Although there were a couple little kids around who I'm sure got pretty loud at times... She too, stopped after she was put in a new home.
And just to mention one other case I know of around here... A family had a pair of tiels (had two at one time, though lost the female and gave the male away), and the female laid an egg (around the time they were moving to a new house). They gave her a shoebox (after the move), and after nothing came of the eggs they gave the pair a budgie nestbox.... She kept laying, no eggs were hatching, so I finally took the nestbox out and "hid" it, which stopped her from laying. Her mate is now gone, and she's the only tiel left now... and she's laying eggs... circumstances aren't that great as there's constant smoke around her, although cage is cleaner, it's not cleaned, and there's mice that run rampage within the home.... (this is a home that was reported to animal control, and I've only seen one change made...) issue remains unsolved...
I know this is a long post, but wanted to bring up this subject, and how I've seen some birds laying eggs under stress, and how it helped with them being in a new environment or how in some birds removing the stimuli to lay eggs stopped them from laying in the first place. I know some members have birds who occasionally start laying eggs. In some cases they can't get their birds to stop. I haven't tried anything as drastic as hormone shots as I have yet a need to... Thought that maybe some other members might also like to share their experiences with egg layers (not including breeders who are letting their birds breed/lay eggs intentionally!

) Who knows though, maybe someone out there is looking for ways to get an egg layer to stop?