The end of Ramadan is approaching. We are in the homestretch; the finish line is now in sight. Many Muslims increase the intensity of their worship during this period – not as a mad dash for the finish line but because the last 10 nights of Ramadan include tonight's Laylat Al Qadr, or the Night of Power, believed to be the night when the first verses of the Quran were revealed to Prophet Mohammed.
Tonight Muslims are encouraged to perform a night vigil prayer, or Qiyam Al Layl, to mark the special occasion. According to the Quran, the night is "better than a thousand months”.
So having already fasted for nearly one month and observing their prayers and Quranic study, many Muslims now also spend a significant portion of the last few nights performing Qiyam Al Layl.
If I were to liken Ramadan to a sporting event, I would have to compare it to the triathlon, a tough medley of three different endurance events.
Unsurprisingly, in the last few days of Ramadan, you might see some fatigued and rather gaunt-looking people. The holy month is almost over for another year and some worshipers are striving for personal bests.
They might want this to be the first Ramadan in which they read the whole Quran or pray the night vigil prayer on each of the last 10 nights. For some youngsters, they might just be trying to complete it.
Of course, Ramadan is not an endurance event and fasting is not a sport.
But we can perhaps draw some parallels with the world of competitive athletics. In his book How Bad Do You Want It? Mastering the Psychology of Mind over Muscle, award-winning endurance sports journalist Matt Fitzgerald suggests that "endurance sports are largely about discomfort and stress; hence they are largely about coping".
Ramadan too, on one level, is about coping – with the discomfort of hunger and thirst and the effort required to pray long into the night, night after night.
A 2016 article published in the International Journal of Sport and Exercise Psychology explored some of the specific psychological pressures faced by endurance athletes.
Marathon runners talk about “hitting the wall”, a sudden wave of fatigue and negativity that generally hits runners at the 20-mile mark.
I’m sure a few people who have fasted during Ramadan can report having occasionally hit the wall.
But competitive endurance athletes are motivated by the pursuit of worldly success, chasing gold, silver and bronze medals.
This is where Ramadan and endurance sports depart. All forms of endurance require motivation but fasting in Ramadan is motivated by the attainment of higher spiritual ends. Perhaps this is one of the reasons why so many Muslims can and do complete Ramadan.
A Pew Research Centre survey undertaken in 2013 sampled more than 38,000 Muslims across 39 different countries and found that on average, 93 per cent of respondents said they observed the fast of Ramadan. Fredric Nietzsche put it well when he said: “He who has a why can bear any how.”
Another factor helping Muslims endure and thrive during Ramadan is that it is a mass global event – "big society" at its best, with close to 1.6 billion people participating.
One of the psychological challenges reported by long-distance endurance swimmers is extreme loneliness. This would rarely be an issue for Muslims fasting in Ramadan, especially in the UAE.
Ramadan in the UAE is a particularly beautiful time of year. On my drive home from work, I see volunteers giving out iftar boxes to fasting motorists, reducing the risk of speeding.
I also drive past a UAE Red Crescent iftar tent offering free meals to all attendees. Such sights show that Ramadan is as much about giving as it is about restraint and endurance.
When Ramadan ends, many Muslims are ambivalent about it. Sure, they are happy to be able to eat and drink during daylight hours again but they are also slightly sad to bid farewell to the beautiful month.
The celebration of Eid is less like a triumphant medal-awarding ceremony and more like a bittersweet farewell party for an old friend.
Dr Justin Thomas is professor of psychology at Zayed University and author of Psychological Well-Being in the Gulf States
Follow The National's Opinion section on Twitter