Both ideas are wrong. Just because they died in the sleep you should not attribute the word peacefully. And just because their outside showing the pain symptoms , you cannot say they are not peaceful inside. So, peaceful and they are not peaceful is simply dependent on the patterns and incompletions. If you complete all the incompletions your death will be so peaceful, because all the patterns will become irrelevant to your life, irrelevant at that time. The incompletions cannot bind you anymore. So you will have a peaceful, complete peaceful death. Whether you will have a peaceful death or not depends on you have a peaceful life or not. If you can just sit with yourself whenever you want & you are in the space of completion, perpetual completion, you will die only in that space. If you can fall asleep when you want, if you can wake up when you want, you can sit with yourself when you want without electronic gadgets, you will die peacefully.