YOU SAID:
I forgot that you were staying the night.
INTO JAPANESE
私はあなたが夜にとどまっていたことを忘れていました。
BACK INTO ENGLISH
I forgot that you stayed at night.
INTO JAPANESE
私はあなたが夜にとどまったことを忘れていました。
BACK INTO ENGLISH
I forgot that you stayed at night.
That didn't even make that much sense in English.