They can do it when they are bedding down, but sometimes it does seem to be an attention thing.
Brodie dug a lot when she was younger. Every time she did it I would give her the 'down' command which thankfully usually stopped it. She did spend some time in time out though
. She still does it now and then, not nearly as frequently as she used to and again when she is wanting our attention.