To answer your question....
We all know that magical moment when you say Ha-mapil and your communication with the outside world is suspended until tomorrow. Sometimes though one receives a text and wants to answer. Is it permitted at this time?
Ideally, Ha-mapil should immediately precede sleep as the mishna brura says. It can be compared to the bracha we make on food before eating where a הפסק is forbidden. However, the Chaye Adam says that Ha-mapil was instituted עפ"י דרכו של עולם that at night MOST people go to sleep. If a person chooses afterwards NOT to go to sleep and to do other things it is permitted. Certainly this is true if he forgot to daven maariv, count sefira or
[Sorry for being silly. Feeling a little down about something so I am using Rebbe Nachman's eitza of shtus di-kdusha].
So texting [or eating and drinking] after ha-mapil is permitted according to the strict letter of the law but it is certainly better to put away the phone, close ones eyes and try to determine if one's neshama is worthy of being returned for the night to its Creator.
[For a list of sources see Piskei Tshuvos Vol. 2 page 989]