Is it OK to sleep in a mine?

I am starting mining and I am not quite sure what I should and should not do in a mine. E.g. people said that rules had changed and darkness in the mine does not matter any more for insanity.
So my question: Is it OK to build a Leafy Bed inside the mine and sleep down there, or should I rather sleep outside in the nature? Do I gain insanity when I sleep in the mine?
So my question: Is it OK to build a Leafy Bed inside the mine and sleep down there, or should I rather sleep outside in the nature? Do I gain insanity when I sleep in the mine?