Halachipedia says:
If one didn’t repeat Shema after Tzet HaKochavim one must say all
three paragraphs and should have the proper intent to fulfill one’s
obligation.[5]
Reference 5 is to the Mishna Berurah 239 (1).
The SO O Ch starts
קורא על מטתו פרשה ראשונה של שמע ומברך המפיל חבלי שינה על עיני וכו':
On the words פרשה ראשונה, Mishna Berurah says:
( פרשה ראשונה - ואם התפלל ערבית מבעוד יום צריך לקרות כל הפרשיות
ויכוין לצאת בהן המ"ע של ק"ש וגם המצוה של זכירת יציאת מצרים. וטוב לומר
תמיד כל ק"ש שהיא רמ"ח תיבות [בצירוף אל מלך נאמן] לשמור רמ"ח אבריו:
If he prayed Maariv early, he needs to read all three parshiyos and to
have intention to do the positive mitzva of reading Shema and the
mitzva of remembering the Exodus. It's best always to say all three
paragraphs with אל מלך נאמן to guard the 248 limbs.
From here we see that it is acceptable to say Kriat Shema al HaMita and where you say the first paragraph of Shema, instead insert the full 3 paragraphs.
O Ch 235 says
לכתחלה צריך לקרות ק"ש מיד בצאת הככבים וזמנה עד חצי הלילה ואם עבר ואיחר
וקרא עד שלא עלה עמוד השחר יצא י"ח:
Ideally, it is necessary to read Shema as soon as stars are visible
and the time extends until midnight ; if he delays until amud
hashachar, he has still done the mitzva.
So, if one davenned Maariv early, the best thing to do is to read Shema as soon as stars are visible. Then one can say Kriat Shema al HaMita in the normal way, preferably with all three parshiyos.
But if one did not do this then as stated above, it is acceptable to say Kriat Shema al HaMita and where you would have said the first paragraph of Shema, instead insert the full 3 paragraphs with the proper intentions.