If I said Hamapil already and can Not fall asleep then I get very hungry and it will keep me up may I eat something?
Although a person has already said the berachah of hamapil, if a person feels hungry and suffers from discomfort, it is permitted to eat and of course to make the required berachos.
The Rema (239:1) rules that one should not make a hefsek between reciting the Shema and going to sleep, but he does not specifically address the issue of ha-mapil.
However, the Mishnah Berurah (4) writes that one should be careful not to eat, drink, or speak after saying hamapil, so as to avoid a hefsek between the berachah and actually sleeping.
Nonetheless, it appears clear that the berachah is not a birchas hanehenin: sleep is not a type of “pleasure” over which Chazal enacted a berachah, and the blessing is rather an expression of praise, which corresponds to the blessing of “ha-maavir sheina” in the morning (this parallel is drawn by the Mishnah Berurah).
Thus, just as the berachah of “hamaavir sheina” should be made upon waking up, but not necessarily immediately upon waking up, so too the berachah of hamapil does not have to be made immediately before going to sleep, and where one needs to make an interruption, it is permitted to do so.
The Biur Halachah also adds that according to the Chayei Adam the berachah is made over the general “way of the world,” and not over the individual’s personal sleep, so that even somebody who is not going to sleep at all can still make the berachah. The Mishnah Berurah does not rely on this, but for purposes of an interruption it can be added as another reason for leniency.
For this reason we find a number of authorities ruling that asher yatzar can and should be said after hamapil: see Shut Pri Ha-Sadeh Vol. 1, no. 93; Shut Hitorerus Teshuvah Vol. 1, no. 125; Halichos shlomo Chap. 13, note 14; Shut Tzitz Eliezer Vol. 3, no. 27; Shut Be’er Moshe Vol. 1, no. 62. The same is true for eating where there is a need; see Tzitz Eliezer Vol. 7 no. 27 sec. 3.