This is incongruous with how the book ends — which shows the wife as finding the mask and leaving the mask on the pillow to indicate her understanding.
Kubrick doesn't always stick to the book. In the ending of Stephen King's "The Shining", the Overlook Hotel literally blows up in a giant explosion. I think most people can agree Stanley Kubrick did the right thing by leaving that out of the film!
Most people being anyone but Stephen King, who hated the movie.