。
An idea came to me.
Literal
Great-idea [subject-が] surfaced.
浮かぶ ('to float, to come to mind') — a compact metaphor for ideas 'floating up' into consciousness. Japanese uses this water/surface metaphor extensively for mental events.
An idea came to me.