Pistachios contain vitamin B6 and magnesium, which have been found to improve sleep quality (1), (31), (32). That is why the intake of pistachios is good before bed.