My experience has been that once your hair gets long enough it just hangs off the bed and stays there by it's own weight.

For mid-lengths of hair (say between shoulder and buttlength) you can just make a loose comfortable braid to sleep in.