Book Name:Method of Self-Rectification
اَلۡـحَـمۡـدُ لِـلّٰـہِ رَبِّ الۡـعٰـلَـمِیۡنَ وَ الـصَّـلٰـوۃُ وَ الـسَّـلَامُ عَـلٰی خَاتَمِ النَّبِیّٖن
اَمَّـا بَــعۡـدُ فَـاَعُـوۡذُ بِـا لـلّٰـہِ مِـنَ الـشَّـیۡـطٰنِ الـرَّجِیۡمِؕ بِـسۡمِ الـلّٰـہِ الـرَّحۡـمٰنِ الـرَّحِـیۡمِؕ
وَعَلٰی اٰلِكَ وَاَصۡحٰبِكَ يَا حَبِيۡبَ اللّٰه اَلصَّلٰوةُ وَالسَّلَامُ عَلَيۡكَ يَا رَسُوۡلَ اللّٰه
وَعَلٰى اٰلِكَ وَاَصۡحٰبِكَ يَا نُوۡرَ اللّٰه اَلصَّلٰوةُ وَالسَّلَامُ عَلَيۡكَ يَا نَبِيَّ اللّٰه
نَوَيۡتُ سُنَّتَ الۡاِعۡتِكَافِ
I make intention of Sunna iꜤtikāf
As mentioned in Fatāwā Shāmī:
If someone wants to eat, drink or sleep in a masjid, he should make the intention to observe iꜤtikāf and perform the dhikr of Allah for some time. Then, he may proceed as he wishes (i.e. now if he wants to eat, drink or sleep, he can do so).