All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
A woman is not Islamically obligated to cover her hair if she is alone in her home or in front of her husband or any of her Mahrams, rather it is permissible for her to do so.
However, it might be that covering her hair becomes an obligation if she feels something suspicious from any of her Mahrams, in which case, it is not permissible for her to show her hair or any part of her body in front of him. In this case, she should deal with him as a non-Mahram.
For more benefit, please refer to Fataawa 90591 and 82530.
Allaah Knows best.