it is some personal experiences that motivate me to think more deeply about the effect of onions. I believe that the smell of oinions has the calming effect, which makes us more relaxful and thus the quality sleep.
Anyway, it won't hurt you except the cost of onions. If it does not has the expected efftect, just stop it.