First and foremost, we’d like to make it clear that the religion of Islam seeks not to cause any hardship to its adherents or burden them beyond their capabilities. Easiness and facilitation are of the main characteristics of Islam. Almighty Allah says: (Allah would not place a burden on you, but He would purify you and would perfect His grace upon you, that ye may give thanks.) (Al-Ma’idah: 6)
This concept of facilitation and easiness in Islam are clearly manifest in its simple and flexible legislations. In taking into consideration different conditions facing people, Islam facilitates its rulings in a way that such diversity comes to term with the application of Shari`ah rulings, without being divorced from the reality whatsoever. The question in point, serves as an example of how Islam seeks facilitation in its legislations.
When a person lives in such an area (i.e. near the two poles), he/she should follow the prayer timing and fasting of the nearest country that has a regular schedule or he can pray and fast according to the timings of the cities that are nearest to them in the normal time zone, i.e. below 64 degrees north or above 64 degrees south.
In his well-known book, Fiqh As-Sunnah, Sheikh Sayyed Sabiq states:

Scholars differ about what the Muslims who are in areas where the day is extremely long and the night is short should do. What timings should they follow? Some say they should follow the norms of the areas where the Islamic legislation took place (i.e. Makkah or Madinah). Others say that they should follow the timings of the area that is closest to them which has normal days and nights.

Elaborating more on the issue, Dr. Muzammil Siddiqi, former president of the Islamic Society of North America, adds:

At the poles, that is at 90 N and 90 S the sun does not set for six months continuously, with the exception of one day of the first equinox and then remains risen above the horizon for the other six months continuously with the exception of one day of the second equinox.
Even below 90 N down to 60 N and above 90 S up to 60 S the days and nights are abnormally long or short during the summer and winter seasons respectively. At one time, this was a theoretical issue, but now, Alhamdulillah, Islam has reached to these regions and many Muslims are living there.
Muslim jurists considered this situation long time ago. They based their Ijtihad on the verse of the Qur’an that says, (Allah does not burden a person beyond his/her capacity.) (Al-Baqarah :286)
There is also a Hadith, reported in the books of Muslim, Tirmidhi, Abu Dawud and Ibn Majah, in which the Prophet, peace and blessings be upon him, described the situation at the time of the appearance of Dajjal. He said, “When the Dajjal will come to deceive the people, he will remain on the earth for forty days, one of which will be as long as a year, the second as long as a month, the third as long as a week and the remaining days as your normal days.” One of the Companions stood and asked the Messenger of Allah, ‘On the day which will be as long as a year, would it be sufficient to offer only five prayers of the day?’ The Prophet, peace and blessings be upon him, replied, “No, but calculate.”
The aforementioned Hadith gives a principle of determining the times of prayers and fasts in abnormal situations. Thus, according to the Ijtihad based on the above verse of the Qur’an and the Hadith, Muslim jurists have given the name ‘abnormal zones’ to the areas where the days and nights are unusually long or short.
A conference of Muslims jurists and astronomers was held in Istanbul about 35 years ago. All the jurists gathered there agreed that the areas above 64 degrees latitude in the north and below 64 degrees latitude in the south should be considered ‘abnormal zones’ whereby people should not follow the movement of the sun, but they should follow the movement of the clock for their five daily prayers and fasting. They can pray and fast according to the timings of the cities that are nearest to them in the normal time zone, i.e. below 64 degrees north or above 64 degrees south.