Hi,
If your grandparents' inability to sleep is due to pain, you may use
paracetamol (325 mg at night) which is low risk in case of
G6PD deficiency.
Avoid over the counter pills for sleep because they are useful only in short term and have possible side effects such as increased risk of falls. They often disturb sleep architecture. They can be habit forming in long run and then further disturb sleep.
It is much better and safer if they follow principles of
sleep hygiene.
Keep the same waking time each day.
Don't sleep for the first six hours after waking up.
Avoid day time naps. If you can't avoid, keep day time naps to about half an hour.
Exercise regularly.
Don't watch TV / computer screen or mobile screen for an hour before your sleep time.
Go to bed only when sleepy.
Avoid bright light and noisy room for sleep.
Don't take tea/coffee in evening/night.
Don't lay in bed, if you can't sleep. Sit up and listen to music or read in soft light.
Develop a relaxing routine before sleep time.
If at all they have to take a medication for sleep, they may try
Melatonin first. They may also try short acting sedatives such as
Zolpidem. Talk to your doctor about this.
I hope this answers your question.